Sound: play/stop

0 favourites
  • 2 posts
From the Asset Store
Best soundtracks for any game. High quality and engaging assets.
  • Hello everyone

    I'm currently making a mobile game and I have run into a issue that I hope you guys can help me solve. Every level in my game has a soundtrack and sound fx, the problem I'm facing is when changing layout to a new level the previous soundtrack keeps playing over the new soundtrack. So how can I make it so when changing layout (level) the previous soundtrack stops and the new one plays? Thank you for your time :)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello creamcakes

    You should use 2 things :

    • the events "on start of layout"/"on end of layout"
    • tags for your sounds.

    At the start of layout, start playing soundtrack with tag "soundtrack".

    At end of layout, stop playing "soundtrack"

    (those are actions of the Sound object)

    If you add a global variable in each layout, variable containing the name of the soundtrack, you can just have those 2 sound events in every layout , just using the variable to play the wanted soundtrack.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)