Play 2 music tracks

Hi there,

Is there a way to play 2 music tracks?
For example, I have background music that needs to continue unless the player decides to turn it off, i have an actor for that.

Next, I'm doing a voiceover that should play with the music, player should have the option to turn off voice over if needed, or turn of background music if needed (which I have done)....

I've tried to import the voice over as sound, and the background is imported as music, this isn't working.
I've tried both as music, doesn't work!

So whats happening currently is that the background music plays, when I select the voice over, the music stops and voice over starts, doesn't give the player a good experience :-S

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Import them as sound files and use the play sound behavior instead of the music behavior.
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    Thanks for responding!!

    ok, let me give it a go :-?
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    Dear FryingBaconStudios,

    I tried what you said. I can pause the sound, but when the actor is pressed again, It doesn't resume the sound where it left off, or it doesn't restart the sound.
    I can't figure it out.

    I used the integer attribute when touch is pressed change attribute game.music to (game.music+1)%2

    Somehow I can't get it to pause the music, even after creating rule:
    attribute game.music = 0
    Play sound

    attribute game.music = 1

    interpolate game.audio.sound volume to 0.0 (this one works! to pause the sound)
    Duration 2

    Cannot unpause sound :(
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    nevermind! I got it, I needed to interpolate audio both times.

  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    ok, I got another problem, once I change scene, the sound restarts, it doesn't resume from where it was paused. Any idea if this can be done?
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    Ok, what I found was I had the option: loop checked. I unchecked this and now I get exactly what I need, except the sound won't loop. Since it is a music file imported as sound, it needs to loop. Is this possible?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes sound files can't be paused like music files. Unchecking run to completion will stop the sound from playing during scene change. The best suggestion is to interpolate the volume up and down to control how and when you want the sounds.
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    ok, thanks for your suggestions. Much appreciated!
  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    Since it is a music file imported as sound, it needs to loop. Is this possible?
    @MeruChakraAus

    Find out the length of your track in seconds.

    Timer: Every XX seconds Play Sound.

    (You would also need to stick in a separate 'one off' Play Sound behaviour as the Timer won't start to play the sound until *after* the length of time stipulated).
  • MeruChakraAusMeruChakraAus Member, PRO Posts: 38
    oh! Great! I think this will work! Thanks :)
Sign In or Register to comment.