ID:149445
Apr 28 2002, 8:14 am
|
|
how to make somebody stop in their position.
|
In response to DarkTitan
|
|
DarkTitan wrote:
Try this. Thats a good start, but change this line if(src.lock) return 0 that lets them not move |
In response to Sariat
|
|
Actually that code is totally tested:) It works just fine.
DarkTitan |
In response to DarkTitan
|
|
DarkTitan wrote:
Actually that code is totally tested:) It works just fine. return 0 looks better to me :P |
In response to Sariat
|
|
Wait a sec your right the code I have when I checked did include returning 0 hehe my bad :p
|
In response to DarkTitan
|
|
I need it as a proc though. It's for a stamina thing so they can't move until they have enough Stamina.
|
In response to Buzzyboy
|
|
Buzzyboy wrote:
I need it as a proc though. It's for a stamina thing so they can't move until they have enough Stamina. Just change the loc var when you want them to be able to move or not move. My movement library has the same feature, except to loc the movement you do move_LockDown() or move_UnlockDown(). |
In response to Ebonshadow
|
|
thats too confusing I already tried it
|
mob/var/locked = 0 //define this so everybody is born unlocked I hope you learned something! |
mob
var
lock = 0
verb
Lock(mob/M as mob in world)
if(!M.lock)
M.lock = 1
else
M.lock = 0
Move()
if(src.lock)
return ..()
else
..()