Godot Version
<4.2>
Question
<Hey. new dev here. I was wondering how can I make music stop during a level goal? I have a AudioStreamPlayer2D playing music in my test level, but I can’t seem to stop it when the player reaches the goal.>
<4.2>
<Hey. new dev here. I was wondering how can I make music stop during a level goal? I have a AudioStreamPlayer2D playing music in my test level, but I can’t seem to stop it when the player reaches the goal.>
Just use stop function, you can give me more information like codes so I can understand what is your problem
What did you try to stop it? By the way, for music you should probably use AudioStreamPlayer, not AudioStreamPlayer2D, as music usually doesn’t have a position.
Actually, I just solved it. Thank you! But I’m curious, what i the difference between AudioStreamPlayer and AudioStreamPlayer2D?
Actually I just solved it. Thank you anyways! ^_^/
AudioStreamPlayer2D should only be audible if the Camera or a AudioListener2D is close to it’s position. Same with AudioStreamPlayer3D. A AudioStreamPlayer has no position, and is audible everywhere.
Difference between AudioSteamPlayer and AudioSteamPlayer2D is that AudioSteamPlayer2D works as a range of sound I means it works based on distance like the sound of water (near sea in 2d only) but AudioSteamPlayer works as a background music/sound, it plays anywhere
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.