Music trouble

jb15jb15 Member Posts: 602
edited November -1 in Working with GS (Mac)
So, I've gone through TSB's tutorial on adding music to my game. The actor that starts the music is on the menu. The problem is, when I navigate to another scene, the music stops after a little while (I have it set to loop, so not sure why).

What am I doing wrong? Do I need to add the "Play music" behavior to an actor in every scene?

As always, any help is appreciated. :)

Comments

  • mshannonmshannon Member Posts: 35
    Did you import the file as music or as a sound?
  • jb15jb15 Member Posts: 602
    music
  • jb15jb15 Member Posts: 602
    Yeah, I was right. I just had to have an actor in each scene to play the music. Seems kind of wierd, since music is inter-scene-changable. Anyway, problem solved.
  • jb15jb15 Member Posts: 602
    Wait, wait wait. OK, I'm having serious trouble. So, the main on/off music sound button actor is on the main menu. It starts the music, and if game.music=0, continues playing, if game.music=0, pause the music.

    When I navigate to another scene, the music continues playing, but does not start again when it's stopped. Like I said before, I have the music set to loop, so I'm not sure why.

    It seems so simple..all I want is to have an on/off music button on the menu. I want the music track to play over and over again, when it's stopeed. Unless, of course the music is "off."
  • jb15jb15 Member Posts: 602
    I'm searching the forums and I'm not finding too much info on the subject--although, I do see that I shouldn't use "Reset Scene." How can I reset my scene (when the player fails, and has to try again) without using "Reset Scene?"

    Is there a way to "Change Scene" to the current scene? If it helps, all my levels are named level1, level2, level3, etc.
  • liamoliamo Member Posts: 191
    yip, you just say change scene and choose the scene you're on.
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    You need to use change scene as much as possible. You should have a play music rule on the first scene (main menu, intro, splash screen, etc) and then as long as you use the change scene behavior for everything it should loop and play fine. Don't use reset scene like liamo said before, just use change scene and change it to the current one.
Sign In or Register to comment.