Music help

CLAYCLAY Member Posts: 72
edited November -1 in Working with GS (Mac)
how do you put a music to your game, i know there is the behavior (play music) but my probelm is that the music stops and repeat from the beginig when the scene is changed ...I put the music behavior in my main player (he is in all the scenes) ... so how do we do to keep the music playing while changing scene ?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    put your music in only one scene (the first one) and be sure to NOT use reset scene (it stops the music from the previous scene). Use change scene as it keeps the music going.
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    When every scene loads, it loads every actor as well. If your "Play music" behavior is in an actor that is loaded every scene, it will start to play the music every time it is loaded.

    What you will need to do is add the "Play music" behavior to your game before you start loading any scenes.

    For example, create a new scene. Place an image in it, maybe some artwork for your game, and this can function as a splash screen.

    Add 2 rules:

    After 2 sec. change scene to main menu

    Play music

    This will give you a splash screen and play your music. When you start the game it will continue to play even when you change scenes (as long as your dont use the "reset scene" behavior).
  • mrabdulmrabdul Member Posts: 1
    I finally figured it out! put the music in only one of the actors of the first scene, and be sure that actor does not appear in other scenes as that will cause the song to repeat. The song will still keep going throughout all the scenes, even loop if you want it to, if you try this.
Sign In or Register to comment.