Is there away to have more then 20 timers in AGS

Started by Dr Fred Rubacant Edison, Sun 12/04/2009 21:48:26

Previous topic - Next topic
Just wondering Is there away to have more then 20 timers in AGS

Mabey using a Plugin or Modules mabey?? I looked on Google but cant find any :(.


Or dose MMM have its own special timers i can use?


Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!

Vince Twelve

You could use a custom variable and just count it down in repeatedly_execute_always.

Code: ags


//in header
int timer21=-1;

//in whatever function you need to use to set the timer
timer21=1000; //equivalent to SetTimer(21, 1000);

//in repeatedly_execute_always
if(timer21>0) timer21--;

//in whatever function you need to use to check the timer
if(timer21==0){
  timer21=-1;
  ...
}
//or
while(timer21>0){
  Wait(1);
}
timer21=-1;
...

Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!

Trent R

Quote from: Rubacant on Sun 12/04/2009 21:48:26
I looked on Google but cant find any :(.
I'd suggest a forum search rather than a Google search.

Indeed, there is a Timers Module. Two, in fact!


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Some say i need panels! and Some say i dont Need them.   WHERES THE DRUGS I'm going CRAZY. Plus I must have been on Drugs and a Maniac if i was going to name the game Maniacs Mansion.

What was i thinking!!!!!

SMF spam blocked by CleanTalk