How do I add background music?

  • How to add instrumental (back music):

    1- Go in the Event sheet

    2- Click "Add event"

    3- Click "System"

    4- Under "Start & end" choose "On start of layout"

    5- Click "Audio"

    6- In the Add Action box that appears, under General click "Play"

    7- In the "Parameters for Audio: Play" box that appears, choose the file in the Audio file drop-down menu.

    8- in the "Loop" drop-down menu choose "Looping"

    9- Click the "Done" button.

    This is what I did, but now every time the game resets, the music does not (my song increases in speed -- like the Space Invaders theme) and continues into the new start of game. If I loop, it seems to play the song twice at the same time. How do I get the background music to stop at the end of the layout/game, and reset along with the player lives and score, etc., when the game ends/restarts?

  • This is what I did, but now every time the game resets, the music does not (my song increases in speed -- like the Space Invaders theme) and continues into the new start of game. If I loop, it seems to play the song twice at the same time. How do I get the background music to stop at the end of the layout/game, and reset along with the player lives and score, etc., when the game ends/restarts?

    In the "On start of layout", before having the "Play" action, do add the "Stop TAG" action from the audio plugin where TAG is the tag name of your background song.

    It will stop each time you go to the layout and start over from the start of the song, once (on the Play action).

  • Thanks! I think that worked. Now I'm having another issue. When I uploaded my game a week ago, all of the sounds worked perfectly. Now, one of my music files plays as buzzing instead of the song. It just randomly started doing this with no changes made by me. I've checked the file itself and it's not corrupted and I even reinserted it into my layout -- still doesn't play anymore Any ideas? Here's a screen shot of the mexicanorgan file.

  • Try Construct 3

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

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

    event 64 will get executed every tick - as long as lives = 0

    so it is starting to play the song 60 times a second...

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