|
Axe Software Forums
Quest Developer Forum recording/getting playing time.
|
Author | Topic: recording/getting playing time. |
Computer Whizz |
posted 26-08-2000 20:40 GMT
I was wondering if there's a way to record the playing time. Because I want to grade the player on the time it took to complete the game (and other factors) I wanted to know if there was a way I can do this from within quest or say I wrote a program to start a timer (from 0) and quest could get the time from the program when the player is saving, add it to a value (hours= minutes= and seconds= or something like that) so that over the time it would have the overall time up-until that save. eg. I've been playing the game 5 minutes and decide to save, it takes the time from the timer and puts it into the correct values. it then re-sets the timer and saves. then I play for another 5 minutes.. I save again, it takes the 5 minutes from the timer, ADDS it to the values, re-sets the timer and saves.and so on... can it be done or do I have to wait untill a later version?? --CW |
Alex |
posted 26-08-2000 21:33 GMT
If you set the timer action to increment a numeric variable, everything else should be covered automatically, as the numeric variable will be saved whenever the game is saved, so when the game is reloaded, the timer will keep incrementing from where it left off. So it really is very simply indeed: define timer <gametimer> ...should do the trick.
|
Computer Whizz |
posted 29-08-2000 20:45 GMT
thanx. just need some info: what version, and how do I recall it (so at the end it can be displayed.)? thanx again! |
Alex |
posted 29-08-2000 21:51 GMT
The code I posted will work with Quest 3.0 Alpha build 9 or later. To display the time take, use something like: msg <You completed the game in %gametime% seconds.> Alex Warren, |