How do i make it so that when im controlling a mob i can only move him 100 steps then after that it will stop me from controlling him ?
obj
hud
ControllingHand
icon = 'blah.dmi'
icon_state = ""
name = ""
Click()
spawn()usr.Controll()
mob/proc
Controll()
set hidden = 1
for(var/mob/m in oview(usr))
if(m.owner == usr)
usr.controll = m
usr.client.eye = m
spawn(300)usr.controll = null
spawn(300)usr.client.eye = null
mob/var/mob/control //The mob being controlled.
mob/var/cmoving //Moving because of being controlled?
mob/Move(NewLoc)
for(var/mob/m)if(src==m.control)if(!cmoving)return
if(control)
control.cmoving=1
step(control,get_dir(src,NewLoc))
control.cmoving=0
return
else return ..()
ID:162239
![]() Feb 7 2008, 1:20 am
|
|
![]() Feb 7 2008, 6:58 am
|
|
It's "control", and "controlling". Additionally, you should be intercepting movement at client/Move(), not mob/Move():
|