How do I play music on a specific level?

0 favourites
  • 2 posts
From the Asset Store
Casual Gameplay Music is a royalty free collection of background music tracks and loops.
  • I'm still trying to learn how to use Construct, I am reskinning and tweaking a template game I bought off the asset store as a learning tool.

    I know how to play a song or sound effect on individual levels when they're separated with their own event sheets, I didn't have any issues implementing a BG song to the main menu that stops when you go to the level select screen.

    But the original creator of the template has all the actual game levels arranged in an odd way that I don't understand yet. When I try to edit the event sheet for any of the levels every event sheet looks exactly the same. Even at the top, regardless of if it's the event sheet for Level 1 or Level 7 it even says, "Global Number Level = 1".

    When I try to add the song to the event sheet for the 1st level like I did with the main menu "System - On Start of Layout - Audio - Play Town Song looping at volume 0db" nothing happens.

    Any clue on what I need to do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Many games will share a single event sheet for the logic that all levels have in common. In those cases, you have to call the name of the song using data from the layout itself.

    Best practice is to put a Sprite Object in your level that has a String variable with the song you want to play for that level.


    On Start Of Layout -> Audio -> Play (by Name)

    "Folder: Music

    Audio File Name: Sprite.String (for example, MusicManager.SongToPlay)"

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