How do I stop my sound effects from playing at the same time

Get help using Construct 2

Post » Mon Aug 15, 2016 10:46 am

It's happening around my game a lot it seems, as an example. I have a function where you can trade creature skins for money, the UI tells you how many skins you have remaining (all this works fine). When you have enough money/skins it will give you the item but also play a sound effect, if you don't have enough money/skins it won't give you anything and play an error sound.

The problem is, if the player has just 1 creature skin the system reads they have at least 1 and trades it for money. At the same, it seems that because it reads how many creature skins I have it also reads that I have 0 because the purchase function is taking one off me when I do have one. This then too plays the error sound, so basically whenever I have one of something left and purchase something taking the count to 0 it plays both the purchase sound effect and error sound effect.

Image

Any help would be greatly appreciated.
----------

If you need a hand with anything, just drop me a PM.
B
8
S
2
Posts: 29
Reputation: 560

Post » Mon Aug 15, 2016 11:44 am

Put them both into the same mouse clicked event as sub events and have the small_bug_skins = 0 as an else should work. It will then only run one of the events each time.

Image
B
45
S
15
G
73
Posts: 2,006
Reputation: 43,394

Post » Wed Aug 17, 2016 9:53 pm

Thanks, plinkie, that did it! :D
----------

If you need a hand with anything, just drop me a PM.
B
8
S
2
Posts: 29
Reputation: 560


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests