BGE How to change a music loop in the middle of a game?
I have all my audio and audio logic setup on my camera, just so it is easy to keep track of it all.
To start I have a boolean game property called &quot;sound_switcher&quot;, the empty checkbox means that it is FALSE. This is what is getting changed when the player goes near my cone object. That property in turn controls which sound file gets played.
The Near sensor detects when the player gets close to my cone (it has a game property of &quot;prop&quot; on it).
When that gets triggered it toggles the game property (booleans can only be TRUE or FALSE).
Now look at the other two sensors (Always and Property). The Sound actuator only plays when the always sensor is true (always) and the game property is FALSE (remember I have it set to false by default).
Notice the top &quot;Nand&quot; controller, it is the important. When the player is near the cone, and the game property is true, the Property sensor is no longer true, thus the &quot;Nand&quot; controller is TRUE, which activates the second sound actuator.
(The Nand controller activates when at least one connected sensor evaluates False, which in this case is the only one plugged in to it the Property sensor.)

Now the logic above will toggle the audio, but if you want the second song to keep playing even when you leave the cone, then simply delete the bottom Nand controller (it is highlighted in orange.)
The blend file