Jump to content
  • Advertisement
Sign in to follow this  
SnicketyLemon

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

This topic is 752 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!