How do I fix the timer?

Get help using Construct 2

Post » Mon Nov 24, 2014 5:12 pm

Hello, I checked all possibilies I know and it doesn't work :( I've found help in the "frequently added question" but it doesn't work.


I made a game where enemies appears after 5, 10, 15s

Then I realized the timer couldn't be modify so I rebuilt the game with a fake timer (a variable)

I have:

System: Every 1s => Add 1 to "Variable Timer"
System: "Variable Timer" = 5 => Creat my object
System: "Variable Timer" = 10 => Creat my object
System: "Variable Timer" = 15 => Creat my object

When I do that, it works, but I have like 9999 objects being created and the game get massive lag, why?

I imagine the timer getting 0, 1, 2, 3 ... and it does works, but why so many objects ? Is it because there is many "ticks" during a second?

I have the possibily to change the variable to "= > <, etc" , my logic suggest I must use "=" to make only one object... Maybe add another condition :?:

How do I fix that please? (I'm sure this is a stupid command but I can't figure it out :mrgreen: )

EDIT: I'm stupid!
I'm looking for special conditions and I see "trigger once while true", Just add this condition and the problem is solved!
Last edited by foxmaster on Mon Nov 24, 2014 5:19 pm, edited 2 times in total.
B
5
Posts: 46
Reputation: 334

Post » Mon Nov 24, 2014 5:16 pm

Hi @foxmaster "Trigger once while true" should do it
Image
B
9
S
3
G
1
Posts: 346
Reputation: 1,560

Post » Mon Nov 24, 2014 5:19 pm

hundredfold wrote:Hi @foxmaster "Trigger once while true" should do it


Thank you dude I ve just seen the option immediatly when I posted.., ridiculous , ridiculous!!! :oops: *cover his face with something*
B
5
Posts: 46
Reputation: 334

Post » Mon Nov 24, 2014 5:32 pm

You can use the Timer behaviour also.
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558


Return to How do I....?

Who is online

Users browsing this forum: koops and 6 guests