How do I stop a sound from continuously playing?

Get help using Construct 2

Post » Wed Aug 03, 2016 7:09 pm

In my events sheet, I have it set up where it'll play a sound when a certain variable is true. The thing is, it plays it, but it won't stop! It just keeps playing the sound infinitely!

How do I fix this? Any help is greatly appreciated! ;)
B
24
S
9
Posts: 113
Reputation: 2,012

Post » Wed Aug 03, 2016 8:01 pm

Create a sub event and use

Some Condition = true
System>Trigger once while true> Play Music
Set Condition = false

As long as a Condition or Variable is true, it's true every tick so you need to switch it off or back to "false". If the music is not set to loop, it will only play once.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293

Post » Wed Aug 03, 2016 8:11 pm

TheDom wrote:Create a sub event and use

Some Condition = true
System>Trigger once while true> Play Music
Set Condition = false

As long as a Condition or Variable is true, it's true every tick so you need to switch it off or back to "false". If the music is not set to loop, it will only play once.


Thanks! :D Y'know, I've never tried using that condition before... I never thought it could be used like that! Mind blown! :O
B
24
S
9
Posts: 113
Reputation: 2,012

Post » Wed Aug 03, 2016 9:23 pm

You probably can use a blank sub event, in place of "System>Trigger once while true". The main thing is including the event to "Set Condition = false", because when something = true, it's true every tick, triggering the events under the condition.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 25 guests