GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Best Way to Implement Music?

PhiliePhilie Posts: 240PRO
edited January 2012 in Working with GS (Mac)
Hey everyone,

For my game, I have a scene in the beginning that determines if an attribute is at 0 or 1, if its at 0 it goes to lets say Scene A, and if it is 1 it goes to Scene B. I'd like both scenes to play the same music, but I would like this to flow a lot smoother. The problem is, sure I can get it to play music on Scene A, but after you complete Scene A, you end up at Scene B, and since I have it playing the same song, it cuts off where it was on Scene A and then resets at Scene B. Is there a way to make a rule if music is playing then do not play, or something? What is the smartest way to implement music without having a cut off/reset?

This might be a stupid question, but I'm very interested!

Thanks everyone,
Matt

Comments

  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    edited January 2012
    Only have one instance that calls on the music, like in Scene A, it will continue to play when it changes to Scene b.

    If you want it to keep playing when you go back and forth several times, you need to set up a boolean attribute. Have it called "playmusic" or whatever you want, then have a rule in Scene a that states…When attribute.playmusic is 'true' Play Music "track1" then have another rules that says, When attribute.playmusic is 'false' Play Music "track1" Then in Scene b, have a rule that says when you click the button to change scenes back to Scene a, to set the attribute.playmusic to false.

    I think thats the way to do it, I'm not sitting in front of my GameSalad computer at the moment, but give that a try and see if it works.

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • PhiliePhilie Posts: 240PRO
    Ahhhh, now your ringing a bell in my head. Makes complete sense, and I just set it up.. works perfectly.

    Thanks a lot SlickZero!
  • SlickZeroSlickZero Houston, TexasPosts: 2,870Member, Sous Chef
    My pleasure :)

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

This discussion has been closed.