I'm trying to get a proc to stop all actions by using the sleep command, I have this now:
meditate() // my verb
set category = "Techniques"
set name = "Meditate"
usr.Meditate()
proc/Meditate() //my proc
if(usr.enrgy >= usr.max_enrgy)
usr << "You begin to medidate."
sleep(50)
usr << "You don't feel any different."
else if(usr.enrgy <= usr.max_enrgy)
usr << "You begin to meditate."
sleep(50)
usr << "You feel better."
usr.enrgy = usr.enrgy + 50
if(usr.enrgy >= usr.max_enrgy)
usr.enrgy = usr.max_enrgy
the problem is my sleep allows the usr to still move and do other things.
ID:178247
Jun 5 2002, 11:07 am
|
|
Jun 5 2002, 11:22 am
|
|
The only way I know how to do this is to have a var/Action. Have it default to 0. On movement and other actions, check to see if it's 0. if(!src.Action). For the meditate thing, have it = 1, sleep 50, then = 0. Also, the shorthand for usr.enrgy (which is spelled energy, by the way) = usr.enrgy + 50 is simply usr.energy += 50.
|
In response to Garthor
|
|
Ok, I really don't know what you meant by that. I kinda get the var part but I don't get how you would put it in?
|
In response to Jinks
|
|
I'm kinda in the mood for another great "Nadrew freebie" today so, here ya' go:
mob |
In response to Nadrew
|
|
and when I thought you quit..... :-p
|
In response to Super16
|
|
Super16 wrote:
and when I thought you quit..... :-p Haha! I shall never leave BYOND, NEVER! Ahem, sorry. |