Let's say you're making a top-down shooter and you want the player to really get into the role of the characters they're controlling. You would want them to experience the environment in the same way and this includes the sounds he/she will hear. Since we already have our emitter and listener, let's take a look at how we can affect the audio based on the orientation of the player (the listener).
You can use the code and setup from the previous recipe; we're just going to adjust some of the code here and there.
obj_playerand delete the Create event.
image_angle = point_direction(x, y, mouse_x, mouse_y); audio_listener_orientation(lengthdir_x(1, ...