Advertisement

Game maker audio_emitter_falloff: too loud up close, too quiet at distance

Started by June 22, 2016 02:25 AM
1 comment, last by SnicketyLemon 8 years, 5 months ago

Hey guys, so with the Game Maker forums being under development, I find myself at a loss for assistance on how to figure out the falloff distance of a laser shot from an enemy infantry to the player. I've set the falloff_max_distance to half of 1920 (full camera width size, with the player being set in the middle) and switched up the falloff_reference_distance several times (the default 100 and everything between 0 and 960) and put the falloff_factor as 1 as well as switch up the volume of the laser itself. But try as I might, I can't figure out how the falloff_reference_distance needs to be set. either I set it closer to 0 with the sound volume set loud and the laser sounds good up close but quiet just a few steps away or I set it closer to 960 with the volume lowered and it sounds good from a distance but terribly loud up close. Anyone who is familiar with Game Maker have any advice on how to fix this? Am I missing something in the code?

p.s. the code (lol)

//Pulse rifle(machine gunner)

audio_pulse_shot_em=audio_emitter_create();
audio_emitter_falloff(audio_pulse_shot_em,480,960,1);
audio_emitter_pitch(audio_pulse_shot_em,1);
Just let me know if this is the correct spot to post this question, I was thinking it was the game design forums I was needing to go to, but then decided it would probably be a safe bet to post a sound question in the music and sounds forums.
Thanks in advance!

-Matt

Got it figured out. :)

-Matt

Advertisement

So, I just changed the Max distance to 600 pixels and the Reference distance to 560 so that the falloff starts at 560 pixels. Then I went in and adjusted volumes and its all starting to come together. Thanks anyways guys!

-Matt

This topic is closed to new replies.

Advertisement