obj
PlayerEliminatorfirst
icon='Objects.dmi'
icon_state="PE"
density=0
Entered(mob/M)
if(ismob(M) && M.client)
M.loc=locate(M.startx,M.starty,M.startz)
New()
spawn() upDown()
..()
proc/upDown()
while(src)
if(loc == initial(loc))
step(src,NORTH)
sleep(50)
if(loc != initial(loc))
step(src,SOUTH)
sleep(50)
Here I have the code for my Player Eliminator, it moves up and down and eliminites players like it's supposed to do.The problem is, it will only elimiate when the player bumps into it from another tile and if the players on the tile when it moves up it just ignores him and nothing happens but it moving behind him.I thought up a solution that involed a proc and was like this
obj
proc
abc()
for (var/mob/M.loc=locate(src.x,src.y+1,src.z)
M<<"It works?"
Yet this gives me two errors.One of them that, when double clicked leads to a part of my code that has nothing to do with this part.The second says "list started here" and points to the "for (var/mob/M.loc=locate(src.x,src.y+1,src.z" part.Does anyone see the problem here?
-Beld
As for the thing not killing people when it moves, just move the player elimination part to another proc, and any time you successfully Move() it, check for an elimination:
Lummox JR