Music that loops forever - even between scenes?
Hi all, my first post!
I have a game with 2 scenes, a game scene and a game over scene. In the game scene I have an actor that plays background music, looping. When the game over scene is shown, the music is still playing. Pressing a button in the game over scene, switches back to the first scene for a new try at the game - but this time the music starts over. Any way to change this, and just have the music keep on playing regardless of scene, never starting over (just looping)? Thanks for any and all help
I have a game with 2 scenes, a game scene and a game over scene. In the game scene I have an actor that plays background music, looping. When the game over scene is shown, the music is still playing. Pressing a button in the game over scene, switches back to the first scene for a new try at the game - but this time the music starts over. Any way to change this, and just have the music keep on playing regardless of scene, never starting over (just looping)? Thanks for any and all help

Comments
In my menu scene
When "game.music started" IS false
Start music - loop
change "game.music started" TO true .
This way next time it will not start again from the beginning ..
I presume you have the play music behaviour in your game scene? - Which is why it triggers new each time you get to that scene. You'll need an attribute with it.
Make a boolean attribute e.g. called MusicOn (leave off as default):
In your game scene, rule: when MusicOn = false > Play music and change attribute MusicOn to true
In otherwise section of rule (i.e. MusicOn is true/music is already playing): resume music (in play music behaviour)
Edit: as Roy says, you don't even need the otherwise section of the rule actually, it would only be useful if you had different music files to play
Cheers
It would be handy if there was an off switch or a simple 'destroy rule' rule !
You place it after your rule and once the rule has been executed it is switched off or deleted for the rest of the game.
Or maybe an option within each rule that says: Use Once.
Basically you can make this "Use Once" thing with a boolean within 1 minute , but a good suggestion to give an option to use a rule only once , you should suggest it to GS .