Editing Timers

Game Editor comments and discussion.

Editing Timers

Postby martinmarinov » Fri May 09, 2008 2:06 pm

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?
martinmarinov
 
Posts: 2
Joined: Wed May 17, 2006 6:04 pm
Score: 0 Give a positive score

Re: Editing Timers

Postby Caaz Games » Fri May 09, 2008 2:17 pm

if you made put the timer script in script editor you can. otherwise no :(
You are welcome to join my forum. 4 active members lol but it's a cool place. active... much talking :D it's fun!
http://caaz.freeforums.org/
User avatar
Caaz Games
 
Posts: 729
Joined: Wed Feb 14, 2007 9:09 am
Location: California....knows how to party!
Score: 25 Give a positive score

Re: Editing Timers

Postby martinmarinov » Fri May 09, 2008 2:19 pm

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.
martinmarinov
 
Posts: 2
Joined: Wed May 17, 2006 6:04 pm
Score: 0 Give a positive score

Re: Editing Timers

Postby DST » Fri May 09, 2008 8:07 pm

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.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron