ID:174293
 
Is there a way to put, on an object: If it moves, do e.t.c.
Like the Bump() command, how do you test IF it is moving, without telling it TO move?
I know I haven't given my attempts, or looked at a Move Demo, because I thought there would just be one simple line like Bump()
If there isn't, please tell me and I will search through all the Demo's for the actual method.

~GokuSS4Neo~
I'm not sure what you mean, but you could try to look up Move() in the ref. if you haven't* already.

<-Airjoe->

* See raekwon? I said haven't not havn't =P
In response to Airjoe
I have looked up Move(), but that appears to only be used for moving the person, instead of seeing if the person is moving!

~GokuSS4Neo~
In response to Gokuss4neo
Move() does not move the mob. The Move() proc is called whenever the mob moves.
In response to Airjoe
Oops!!! My mistake! Very sorry for wasting your time!
Thank you!
~GokuSS4Neo~
When you speak of moving, do you mean automatically like when using walk()? That seemed to be what you were getting at but I'm not sure.

Lummox JR
In response to Lummox JR
Yeh, I mean when the object does ANY moving.
My code for it is the same as the code for my other post, but I'll put it in here as well!

obj
proc
projectile(obj/projectile,var/dir,var/delay)
walk(projectile,dir)
sleep(delay)
del(projectile)

obj
Laser
icon = 'laser.dmi'
icon_state = ""
layer = MOB_LAYER + 99
Bump(A)
if(ismob(A))
var/mob/M = A
if(!M.npp&&!M.npc)
M.Health-= ((3500 * usr.Str)/M.Def)
if(isturf(A))
var/turf/T = A
if(T.dif == 0)
step(src,src.dir)
else
del(src)
else
step(src,src.dir)
Move(src)
var/obj/T = new /obj/Lasertail (src)
T.player = "[usr]"
walk(src,src.dir)
Del(src)
for(var/obj/Lasertail/T in world)
del(T)
del(src)
obj
Lasertail
icon = 'laser.dmi'
icon_state = "tail"
layer = MOB_LAYER + 99


~GokuSS4Neo~