Event Order?

Get help using Construct 2

Post » Fri Mar 16, 2012 6:20 pm

    I am almost finished with my game called "The legend of Bloo". Its a 1 minute game where you have to save as many cows as you can.

While finishing up i ran in to a couple of problems. I solved most of them with work around but i still don't know why my timer is starting at the title screen.


I have a countdown timer but it plays during the title screen and HowTo menu. The thing is my countdown event is on the actual level not the title. Why would it start before i even get to the level?

Really weird.

Any help would be great. I will also mention everyone who helped me on my project in the description.

Thank you   
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Fri Mar 16, 2012 6:24 pm

To answer your question most of us have to see your code. Please post your CAPX
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Fri Mar 16, 2012 6:32 pm

On your level's event sheet, can't you just do:
[code]
On Start of Layout:
Set value of CountDownTimer to 0
[/code]
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Mar 16, 2012 7:13 pm

Won't work. I want to do something like, on start of layout (allow every tick). But every tick is a condition not an action unfortunately.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Fri Mar 16, 2012 7:13 pm

i think every tick is whats running it on game start up.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Fri Mar 16, 2012 7:29 pm

Every tick just means around 60 times per second, you can't turn it off or on. Everything runs every tick, unless you have told it not to with some condition.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Mar 16, 2012 7:42 pm

i guess i have to tell it not to on the title event sheet somehow.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855

Post » Fri Mar 16, 2012 8:22 pm

Seems this could be solved with a simple boolean operation.

Make a global variable and call it something like allowTimer.

During your title set allowTimer to 0.

When your game starts change it to 1 and include an event like this:

+"allowTimer" is equal to 1
+Every tick
-[your events that controls the timer.]
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Fri Mar 16, 2012 10:58 pm

Thank you inkBot. Sounds like it could work. Definitely gonna try it.
B
22
S
5
G
3
Posts: 194
Reputation: 5,855


Return to How do I....?

Who is online

Users browsing this forum: Kagubro and 36 guests