Music overlaping with itself when the level restarts

0 favourites
  • 4 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • Hi. I'm new to Construct 2, so I was doing the Ghost Shooter tutorial. After finishing it, I wanted to add some sFX and music. I added gunshots for the bullets and a crunchy gory sound for when the player dies. Everything is fine with those short sounds. However, I'm having a problem with the music loop. Everytime the player dies and then presses the space bar to restart the game, the music also restarts and overlaps the previous iteration of itself. It happens on every restart. A new iteration of the music overlaps on top of each one of the previous ones, causing a confusing cacophony of looping tracks. What I want is the music to play on start only once, and then just looping without being interrupted or buried beneath a repetition of itself because of a restart. I'm attaching a screenshot of my current event sheet. Thanks in advance.

    (Since I'm from Latin America, there's some spanish words on it. "Salud" goes instead of "Health", "Puntuación" instead of "Score" and "Barra Espaciadora" goes for the"space bar")

    ...And yes, I've replaced the ghost with an image of Giorgio Tsoukalos, because, why not?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should have tags with your sounds and music, doing so you will be able to check if the music is already playing before playing it again, or stopping it before playing it again (heck, it might even solve the issue by itself as I think there can be only one sound playing with the same tag at a time)

  • When your player dies put a command to stop the music. Also put the music to restart when you press restart button.

  • I really don't want the music to restart with the space bar. I would like it to keep looping all the time, while only the layout restarts. The sound file has to be initialized only once, and then just keep looping.

    Also, as I've said, I'm new to Construct, so I don't know how to tag the sounds. Sorry to bother you, and thanks in advance.

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