Yizzard
Member
So I'm trying to make buzz saw objects that just play a constant buzz saw sound effect that get louder the closer you are to them and quieter the farther away. Basically like the ones in Hollow Knight. I first tried to do
in the create event for each buzzsaw, but for some reason the sound would never update and would just constantly be loud. So I then tried
in the step event (with snd being initialized in create) and then it worked much better but it seemed like the sound was only updating volume and such once the full 6 second buzz saw sound effect was over. It was really confusing and didn't really make sense to me, is there a way to have it constantly update?
I tried to use audio emitters as well but couldn't even get them to play any sound and I don't even know if that would help anyway.
GML:
snd = audio_play_sound_at(buzzSound, x, y, depth, 16, 46, 1, true, .1);
audio_sound_gain(snd, global.sfxVolume, 0);
GML:
if(!audio_is_playing(snd))
{
snd = audio_play_sound_at(sou_Explosion, x, y, depth, 16, 46, 1, false, .1);
audio_sound_gain(snd, global.sfxVolume, 0);
}
I tried to use audio emitters as well but couldn't even get them to play any sound and I don't even know if that would help anyway.