SOLVED How do you stop the same sound effect from playing on top of itself

jobjorgos

Member
If theres more than 1 oWaterfall in the room, the audio stack making it sound very loudly. Is there a way to prevent this? !audio_is_playing and audio_stop_sound do not fix it too bad.

GML:
if instance_exists(oWaterfall) and ( !audio_is_playing(snd_stream2) )
    audio_play_sound_at(snd_stream2, oWaterfall.x, oWaterfall.y, 0, 300, 800, 1, true, 1);
 

jobjorgos

Member
Okay my bad... after testing a while, I discovered the sound itself was just loud, and no multiple sounds were playing at all! So !audio_is_playing(snd_stream2) acctually worked to prevent the audio to stack playing.

I marked the topic as solved
 
Top