ID:178738
Apr 11 2002, 2:48 pm
|
|
i'm trying to make it so when you use something such as fly if you click on it again after you are already uing it for a message to pop up saying you are already doing the specific task
|
Apr 11 2002, 2:51 pm
|
|
Just make a variable that checks to see whether it is currently being done or not.
|
Take a look at what your flying code does. I bet it sets a variable to a specific value... like it changes your icon_state to = "flying", or sets src.fly = 1, or something like that, right? Most verbs do change a variable, or else the verb is pointless.
So all you have to do is check that variable at the beginning of the verb. mob var flying = 0 verb fly() if (src.flying) src << "You're already flying!" return //stop right there. else //not necessary, but helps make the code readable. src << "You begin to fly!" flying = 1 |