Page 1 of 1

Editing Timers

PostPosted: Fri May 09, 2008 2:06 pm
by martinmarinov
Hello. I've noticed that after once I had created a timer it is impossible to change the delay. So am I supposed to create new one? Is there a way to edit already created timers?

Re: Editing Timers

PostPosted: Fri May 09, 2008 2:17 pm
by Caaz Games
if you made put the timer script in script editor you can. otherwise no :(

Re: Editing Timers

PostPosted: Fri May 09, 2008 2:19 pm
by martinmarinov
Caaz Games wrote:if you made put the timer script in script editor you can. otherwise no :(

Ok, thank you. I'll create timers only in script editor from now on.

Re: Editing Timers

PostPosted: Fri May 09, 2008 8:07 pm
by DST
Even though you can change the delay in script mode, the timer MUST first exist in the timers list.
The reason for this is that a timer is a premade function to make it easier to make timers;

Professional programmers use for/while loops.

You can find out about for/while loops in any good c programming tutorial/reference page on the net.

Another method is to created your own global clock; For instance, you can create an infinite 1 second timer that makes a variable +=1 each time; then instead of creating a new timer, you can tell it to get the current value of the variable, and execute when the value is 5 more than that (now you've created a 5 second timer).

Like i said, in conventional programming, people create their own timers using for/while loops, the timers in GE are an extra feature Makslane added to make timers easier for beginners.