Ask here your questions to get help using GDevelop.
By AnimatedG
#64650 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
By MattLB
#64661
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.