How do I Stop and Start Music (Ejecta,Xcode)

  • I'm testing my game out in Xcode via Ejecta and I found an issue with the background music. After the game is over, the music stops as it's suppose to do, but when the layout is restarted again, it continues to play the background music where it left off in the previous game and then starts playing the same music from the beginning on top of it. It sounds terrible.

    I have the following events:

    On start of layout | Play Theme looping at volume 0dB (tag "themeMusic")

    Player Is overlapping Spikes | Audio: Stop "themeMusic"

    Am I doing something wrong? Is the a better way to do this?

    Edit: I should mention it works fine in Firefox and Chrome browsers. It's just an issue when testing on iOS Devices. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tried to place the event Audio: Stop "themeMusic" just before the play music event On start of layout as a work around, hoping it will stop the music before playing it again, but no such luck. It still plays the music on top of each other after the first round of play. Still working on it...

    Anyone know a better work around?

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