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!
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,613

Post » Mon Apr 29, 2013 1:32 pm

Add a subevent after the wait action, checking something like 'is not cancelled'.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Post » Mon Apr 29, 2013 3:38 pm

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

Thank you!
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,613


Return to How do I....?

Who is online

Users browsing this forum: OddConfection and 11 guests