How do you make a countdown clock?

Started by sameeralord, Mon 27/06/2005 00:58:04

Previous topic - Next topic

sameeralord

Hi Guys,
I want to make countdown clock in my up coming game. I found the code below from another topic about the samething but this code doesn't work. I have ags version 2.6 not the new one. Can anyone please give me the 2.6 code of this. Also because I'm not that good at scripting I'll tell you the things you need to know so I can straightaway copy the code. My game over room is room 3. Help would be really really appreciated and I would surely put the person who help me in credits. Thank you very much.

// main global script

int gameloops=0;

function repeatedly_execute() {
//...

gameloops++;
int mins = ((gameloops / GetGameSpeed()) / 60) % 60;
if (mins == 10) {
Display("You lose!");
RestartGame();
}

//...
}
Friend in need is a friend indeed!!


Jay

Quote from: sameeralord on Mon 27/06/2005 00:58:04
I found the code below from another topic about the samething but this code doesn't work.


You should read that entire topic (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=17017.0). For one thing, you'll need to create a GUI for the countdown clock. There is code further down in that topic that will help display the countdown for you.

SMF spam blocked by CleanTalk