• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker I need Stereo sounds for a game object!

D

Dwighty4000

Guest
I am using GMS2 with the GameMaker Language and I am currently working on a 2D game.
I'm looking for a way to make an game-object in my game a ruse. Depending on the distance to the player becomes louder or quieter and in a stereo audio output, so that the player can hear from which side of his screen the sound comes from if he can't see the object and it should comes louder if the player comes closer to the object!

It should have the goal later in my game to be able to locate an opponent the enemy, before it is already visible on the screen ...
 
You can use audio_play_sound_at() for simply positional sound, but if your player is moving around, you'll want to read the manual in the Audio section. Specifically Audio Emitters and Listeners.

You'll want to setup an emitter for the sound, and also set the position of the listener to the players current position.

Post back here if you get stuck with anything.
 
Top