Quick answer: Update the listener position each step with audio_listener_position. Set the emitter’s falloff via audio_emitter_falloff, and play the sound on the emitter.
A waterfall has an audio emitter, but the sound plays at full volume everywhere. The listener never moved and the falloff was never configured.
Move the Listener
// Step event of the player/camera
audio_listener_position(x, y, 0);
audio_listener_orientation(0, 1, 0, 0, 0, 1);
Without updating the listener, GameMaker assumes it’s at the origin — every emitter sounds the same distance away.
Configure Falloff
emitter = audio_emitter_create();
audio_emitter_position(emitter, x, y, 0);
audio_emitter_falloff(emitter, 100, 600, 1);
// reference distance, max distance, falloff factor
Inside reference distance = full volume; beyond max distance = silent (or floored). The middle attenuates per the global falloff model.
Falloff Model
audio_falloff_set_model(audio_falloff_inverse_distance_clamped);
Set once at game start. Inverse-distance-clamped is the most natural for most games.
Play On the Emitter
audio_play_sound_on(emitter, snd_waterfall, true, 1);
audio_play_sound (without _on) ignores emitters entirely. Use the _on variant.
Verifying
Walk toward and away from the waterfall. Volume rises and falls smoothly. Stereo pan tracks the emitter’s direction relative to the listener.
“Falloff needs all three: a moving listener, a configured emitter, and play_sound_on.”
For top-down games, keep the listener’s Z at 0 and emitters at 0 too — mixing Z values produces confusing 3D attenuation.