play back a sound just once??

Get help using Construct 3!

Post » Sat Jan 06, 2018 11:21 pm

Hi,
I get a curious strange bug/feature when just trying to play back a sound for once.
Image

After three seconds system time the sound plays back strangely morphed as if being played a hundred times back. At first I thought it might have to do with the system condition I made it depend on. So I added a variable to check that it plays only once but that didn't help.

The sound plays back fine when being not in preview and just playing it back in the project window. Any ideas? :oops:
B
1
Posts: 2
Reputation: 129

Post » Sat Jan 06, 2018 11:30 pm

Move the add HowManyTimesPlayed to event 1, when it is played, otherwise it keeps playing until the first one ends, which is too late.
ImageImageImage
B
71
S
22
G
287
Posts: 3,856
Reputation: 157,913

Post » Sun Jan 07, 2018 8:19 pm

Hey Black Hornet, thanks for the swift reply!
This made the difference indeed.
Would there be a more simple shortcut to let a soundfile just play once based on the same condition? Felt like I had to use some programming wits already for something very simple and ain't great at that. :mrgreen:
B
1
Posts: 2
Reputation: 129

Post » Sun Jan 07, 2018 9:11 pm

From what I can see, you could do:
On start of layout
-> Wait 3 seconds
-> Play sound

This would play the sound once, 3 seconds after the layout starts.
ImageImageImage
B
71
S
22
G
287
Posts: 3,856
Reputation: 157,913


Return to How do I...?

Who is online

Users browsing this forum: oosyrag and 1 guest