layouts and every seconds

Get help using Construct 2

Post » Wed Jul 27, 2016 2:19 am

i created a event sheet that every 25 second create a object in the layout Fase1,but if i wait 25 seconds in the
menu layout, and go to fase1 the object is create.
what i want is when i go to layout fase1 start the count 25 seconds and after object is create.
B
7
S
2
G
1
Posts: 8
Reputation: 991

Post » Wed Jul 27, 2016 6:55 am

Hi

use a variable like when you are in Fase1 variable = start
Then if Variable = start > every 25sec create object
B
18
S
7
G
1
Posts: 56
Reputation: 3,000

Post » Wed Jul 27, 2016 7:35 am

You need to make a custom timer.

Create a global variable called "timer" or something like that. Next you need to make sure the timer only works when the layout is active (like dieblume86 mentioned).

So if layout is active, every 1 seconds add 1 to timer.variable

If timer.variable > 25 then set timer to 0

If timer.variable = 25 then create object

Obviously this would actually make a 26 second timer (25 seconds to count, and 1 second to reset) so you can actually create object at 24 seconds instead. That means the first object will be at 24 seconds, but each object after that would be 25. You could tweak this a little and make it 25 seconds every time I'm sure.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
81
S
34
G
40
Posts: 3,032
Reputation: 30,424

Post » Wed Jul 27, 2016 2:46 pm

thanks,it worked
B
7
S
2
G
1
Posts: 8
Reputation: 991


Return to How do I....?

Who is online

Users browsing this forum: digitalsoapbox, RetrocadeMedia and 1 guest