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
36
S
7
G
5
Posts: 215
Reputation: 5,585

Post » Mon Apr 29, 2013 1:32 pm

Add a subevent after the wait action, checking something like 'is not cancelled'.
Scirra Founder
B
384
S
227
G
86
Posts: 24,139
Reputation: 190,751

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
36
S
7
G
5
Posts: 215
Reputation: 5,585


Return to How do I....?

Who is online

Users browsing this forum: CJacobsSA, dustinboyle, JohannesLudwing, Yahoo [Bot] and 3 guests