ID:170765
 
hey i used a few demos to try to make a lockmovment verb but they made my icon invis but they did work.Does anyone know what i should do?
mob/var/allowed = 1

mob/Move()//when a mob moves
if(src.allowed)//if they're allowed to move(so when allowed=1)
..()//do everything as normal
else //if they weren't allowed to move
return //kill the proc.


Using the above snippet, whenever you want to restrict movement change the mob's allowed variable to 0. Whenever you want to enable movement, change the allowed variable to 1.

This bit doesn't relate to your problem but moderators:

else//if blah blah blah
return//muahahahhahaha


It isn't coming out commented :)
In response to DeathAwaitsU
is there a verb that can automaticly change that to 0 or back to a 1?
In response to Tsonic112
Yes.

(You can make it yourself, if you can't then read demos and tutorials as thats elementary.)
In response to DeathAwaitsU
would soemthing like

mob/Admin
verb
LockMov(M as mob in world)
M.allowed = 0
work??
In response to Tsonic112
i'd use a lill bit more simple freeze proc.

mob/var
frozen


mob/Move()
if(!frozen)
return..()

//and for the admin verb

mob/Admin
verb
Freeze(M as mob in world)
M:frozen = 1



Unfreeze(M as mob in world)
M:frozen = 0

//or use if proc