Cancel actions after a wait action

Get help using Construct 2

Post » Mon Apr 29, 2013 7:29 am

Is there a way to cancel the events after a wait action when some other event triggers?

In my case, I have some fx sounds after a wait 2 seconds action that can trigger at any moment, but if the player losses between those 2 seconds I don't want to play those sounds (in queue to play), and want to play another sound only instead.

My workaround was to mute those sounds by tag (like "muting a channel"), but I realize that they can't be muted if they are not playing at the moment (maybe that is a wanted feature for future).

Thank you guys!
B
29
S
6
G
5
Posts: 148
Reputation: 5,084

Post » Mon Apr 29, 2013 1:32 pm

Add a subevent after the wait action, checking something like 'is not cancelled'.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Apr 29, 2013 3:38 pm

Ohhh... good point.
I'll try it.

Thank you!
B
29
S
6
G
5
Posts: 148
Reputation: 5,084


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, indiegrimes, NRABrazil, PixelatedTrip and 26 guests