|
Axe Software Forums
Quest Developer Forum Time based events?
|
Author | Topic: Time based events? |
malicorne |
posted 04-04-2001 23:58 GMT
Is there a straightforward way to simulate time passing, or timed events occurring? I could put variables in each room and associated with each character, then increment values to simulate time passing, then test to see if a certain "time" has elapsed and take an action. But I'd have to put the same code in every room in which the timed event could occur. That seems pretty cumbersome, so I wondered if there was a more elegant way to do it. Thanks |
Alex |
posted 05-04-2001 10:23 GMT
Instead of putting code in each room, put it in an "afterturn" in the game block. In ASL you might use: afterturn setvar <time; %time%+1> Or in QDK set the after turn action to set the value of a variable and use "time; %time%+1" (without quotes) in the parameter box. Then every time a player moves the value of the numeric variable "time" is incremented by one. |