animelover07's Recent Forum Activity

  • I'm not sure if this is the right way but this is just what I think would work. Create a global variable called "levelmusic" or something like that. Each value of that variable will be a level.

    Let's say levelmusic=1 means level 1, levelmusic=2 means the player reached level 2 and so on (make sure the initial value of the variable is 1, not zero; otherwise you'll get confused; unless you count your levels, level zero, level 1, level 2 etc.).

    Then in your eventsheet, write:

    On start of layout, and add subevents:

    if levelmusic=1, play the song for the 1st level

    if levlemusic=2, play song for level 2, etc...

    You will also need something like a trigger for that variable to change values. So, add an invisible sprite at the end of each level, and add an event in your sheet:

    player on collision with sprite (or whatever you want to call that), add 1 to levelmusic.

    This basically means, when the player touches that invisible sprite at the end of each level, 1 point will be added to your levelmusic variable. This way, your variable value will change everytime the player completes a level and the right song will play for every level. Hope I explained well, and I hope it helps XD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi, I'm Maria from Romania. I always wanted to know how to make video games and thanks to construct 2 now I have the chance to do it. I'm still learning how to use the software but I'm sure I'll get better XD

animelover07's avatar

animelover07

Member since 14 Dec, 2015

None one is following animelover07 yet!

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies