Using Timer Intervals

Non-platform specific questions.

Using Timer Intervals

Postby Drickman » Thu May 04, 2006 7:49 am

Is there a way to have one single timer that can have events attached to specific intervals. For instance have a 30 second timer, and from 5-10 seconds change the animation. Thanks in advance.
Drickman
 
Posts: 3
Joined: Sun Apr 16, 2006 4:54 am
Score: 0 Give a positive score

Postby makslane » Thu May 04, 2006 2:52 pm

I think a timer with 30s interval don't will works.
You can use a 5s interval timer, and use a variable to count the intervals.

But why you don't use different timers?
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Drickman » Thu May 04, 2006 10:07 pm

well what i wanted to do was actually use a song then have a timer that will be the length of the song and at certain point in the song(which i would specify) i would like it to do things. So for a 3 minute song say i wanted to have something happen at 10 different points, i didn't want to have to keep up with a bunch of timers, but i guess i could just have 1 second timer which will change a variable and i can use that variable to check the seconds... but how do i attach a variable to do that?
Drickman
 
Posts: 3
Joined: Sun Apr 16, 2006 4:54 am
Score: 0 Give a positive score

Postby Drickman » Thu May 04, 2006 10:10 pm

Thank you for the help by the way.
Drickman
 
Posts: 3
Joined: Sun Apr 16, 2006 4:54 am
Score: 0 Give a positive score

Postby makslane » Fri May 05, 2006 3:19 am

- Create a integer variable in the Script Editor variables button
- In the timer event, you can count the timer:

count++;

- And make your actions:

if(count == 10)
{
.....
}
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest