Author Topic: adding a timed image  (Read 1324 times)

Agames

  • Guest
adding a timed image
« on: December 07, 2013, 04:11:25 pm »
How would I add an image every minute or so in a game without having to touch or click on anything?
« Last Edit: December 16, 2013, 01:47:29 pm by Agames »

carlos.yalluh@gmail.com

  • Guest
Re: adding a timed image
« Reply #1 on: December 26, 2013, 12:46:18 am »
The OnTimer() executes 30 times per second. 60 seconds x 30 executions = 1800 executions per minute.
Every 1800 executions, add image and loop timer variable back to 0.



int minuteLoop;

OnTimer()
{
   minuteLoop++;
   if(minuteLoop== 1800)
   {
      minuteLoop=0;
      //ImageAdd, ViewAdd
   }
}

Agames

  • Guest
Re: adding a timed image
« Reply #2 on: December 26, 2013, 07:02:15 pm »
Thanks a lot! This is really helpful :)