gennadiy | Is it possible to add time to your game, like you have 5 minutes to complete the quest or sth?, so what I mean is that time counts from 5 minutes to zero and when it reaches zero then the quest or mission is failed? ??? |
Brian_Provinciano | Yes, you can look in the docs at the time variables. As well, you can look in such games as Space Quest for how it's done. |
rwfromxenon |
For a timer counting down, try something like this. This code is buggy, because I have no reference right now.
You could also try,
|
Sami_Tervo |
Here's lil modification of timecode from my own project. if(f5){ load.pic(v0); draw.pic(v0); discard.pic(v0); show.pic(); reset(f40); reset(f41); v40 = 0; v41 = 0; v42 = 5; // Time left (minutes) v43 = 0; // Time left (seconds) } // Minutes if(v12 != v40){ v40 = v12; set(f40); } if(f40){ v41--; v43 = 60; } reset(f40); // Seconds if(v11 != v42){ v42 = v11; set(f41); } if(f41){ v43--; } reset(f41); display(24,2," Time remaining [ %v41:%v43 ] "); if(v41 == 0 && v43 == 0){print("You ran out of time!");} return(); |