ID:165036
 
Hello again.
I wanted to know how to control another object or mob dynamically instead of like this:
mob/var/tmp/t1move//If this var isnt null then they are moving something.
client
East()//The direction I am moving it in
if(usr.t1move == 1)//Could have been just if(usr.t1move) but I trimmed my code down so that it only had one ship in it.
for(var/Ship/Ship1/M in world)// The ship
if(usr.client.eye == M)//Make sure they are watching the ship
step(M,EAST)//Moving part
else//If thy arnt actually moving it or are just watching it
..()<dm>

I tried calling Move() for another object when the player moves but nothing happend any ideas? I might not reply for awhile though but I appreciate any help.
aha, I have found a way of doing this using some code and I am going to post it now incas anyone else is having trouble.
mob/Move(NewLoc,Dir)
if(src.client)
if(src.client.eye != src)
var/Tardis/M
for(var/Tardis/T in view(0,usr.client))
if(T.IsTardis)
M = T
break
if(!T.IsTardis)
..()
step(M,Dir)
return 0
else
..()
else
..()


There may be some bugs in this code, the IsTardis is a variable that if is positive meens that the ship or whatever can be moved.