verb
DelayTest()
var
ondelay
if(ondelay == 1)
usr << "On Delay"
else
ondelay = 1
sleep(50)
ondelay = 0
Problem description:
I'm trying to create a localized delay for separate verbs by creating the delay variable in the verbs. However, if I understand correctly, each time I use the verb the variables are reset to the default value of 0. This, of course, results in the entire verb not working as intended. I'm here to ask how I could successfully implement a delay system without having to include a global delay variable for EVERY verb I code into the game.
What do you want the delay to accomplish? Is this something that you want to wait X time and then run a proc, or change a variable/path, or output data?
An example would be: