sound code

lucario888

  • Posts: 38
Hi guys, I just wanted to see if someone would tell me something I need. Is there a way to make a code in music that does not make the music start whenever the player enters the scene? I know I could just do this:

When created
Stop all sounds
play town music on channel 7

But that will make the music start from the beggining which could be annoying to the player. This might be a no-brainer ,but I can't figure it out. If someone could help me, that would be greatly appreciated.

iNK

  • Posts: 68
You mean you don't want the music to restart when the scene's reloaded?
This article might be of use: http://community.stencyl.com/index.php?topic=13166.0
Also, there's a bit about this problem in the Stencyl docs: http://www.stencyl.com/help/view/playing-sounds-and-music/

In short, looped music doesn't stop playing when a scene reloads, or a scene switch occurs.



sdieters

  • Posts: 2068
i created a video about how to tackle this >> https://www.youtube.com/watch?v=VFsPF9PLMW4
the music part starts around 20 minutes.

Good Luck!
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

lucario888

  • Posts: 38
i created a video about how to tackle this >> https://www.youtube.com/watch?v=VFsPF9PLMW4
the music part starts around 20 minutes.

Good Luck!
Thanks! you really helped me a LOT.