Timer Won't Start?

Just started using Construct 2? Post your questions here

Post » Sat Oct 28, 2017 11:26 pm

I have a sprite on a timer, but the timer just won't start! I have other timers that work just fine. What might the problem be?
B
8
S
2
G
1
Posts: 89
Reputation: 1,230

Post » Sun Oct 29, 2017 2:39 am

Impossible to say without seeing what you are doing.
ImageImageImage
B
72
S
22
G
290
Posts: 3,886
Reputation: 159,513

Post » Sun Oct 29, 2017 3:13 am

@blackhornet

Sorry, here it is!
https://www.dropbox.com/s/omyycniwzr8g80x/MCG10.28.2.capx?dl=0

Event sheet Line 154 is the issue.
I ran the game through the debug and saw that the "SecretPassage" timer never even starts.
B
8
S
2
G
1
Posts: 89
Reputation: 1,230

Post » Sun Oct 29, 2017 4:14 am

You don't say how to get to the secret passage, but if I had to guess, I'd say the timer is probably being triggered constantly, so it looks like it isn't starting, when it is constantly starting. You can try a trigger once, but you need to keep track of your states when you want to trigger things to happen.
ImageImageImage
B
72
S
22
G
290
Posts: 3,886
Reputation: 159,513

Post » Tue Oct 31, 2017 11:57 am

@blackhornet

Hi! Sorry about not being clear. Please check out my capx! I've added arrows.
https://www.dropbox.com/s/plwf2km2bnr471d/MCG10.31.capx?dl=0

When you go into the secret passage, stand in the dark, and let your match die without lighting another one, the timer is supposed to start (see event sheet line 147). I've done all those things, and the timer does load, according to the debugging. It just won't start ticking down.
B
8
S
2
G
1
Posts: 89
Reputation: 1,230

Post » Tue Oct 31, 2017 1:23 pm

If it starts and not ticking down, then blackhornet is probably right - your timer is restarting again and again every tick.
You can add some debug output (for example Browser->Log "timer start") to check if this really is the case.

You need to update conditions in this event to make it trigger just once.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
19
S
9
G
158
Posts: 2,396
Reputation: 84,419


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests