Page 1 of 1

Sound activating by itself at start of scene

PostPosted: Thu 11 Jan 2018, 12:51
by AnimatedG
Hi guys,

My sound files are playing once by itself at the start of a scene.
Am using play a sound under action.
Changing to play a sound on a channel yields the same result
Even tried stopping all sounds on the channel at beginning of scene

All files have been imported to the images bank.

Any idea why this is happening?

-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Edit:

Nvm, i figured it out.

For the benefit of others who may encounter this problem.

This was caused by the audio activating when the gun fires.
But i forgot to reset the timer for the gun firing at the start of the scene hence the audio played

Re: Sound activating by itself at start of scene

PostPosted: Thu 11 Jan 2018, 20:29
by Jiidev2008
You can try not to repeat the sound by playing it in action only, for example when you have an event but I know that it happens to me also for buttons and fly overs, finally ... Good luck!

Re: Sound activating by itself at start of scene

PostPosted: Fri 12 Jan 2018, 01:36
by MattLB
But i forgot to reset the timer for the gun firing at the start of the scene hence the audio played


I recently encountered this same problem, where if the first mention of a timer is in a condition e.g.

Code: Select allThe timer "react" is greater than 240 seconds 


then GDevelop will consider the condition to be true (even when it isn't) and do the action. Pausing the timer "react" in the At the beginning of the scene event corrects it.

Re: Sound activating by itself at start of scene

PostPosted: Fri 12 Jan 2018, 09:29
by AnimatedG
Hi guys, thanks for responding :)

Jiidev2008: Thanks but the problem was due to me forgetting to pause the audio at the start

MattLB: Interesting, didn't know that happens. Thanks :)