Schedule Audio Works In One Project But Not The Other Despite Identical Code.

0 favourites
  • 2 posts
From the Asset Store
5 levels with simple coding Source-code (.c3p) + HTML5 Exported
  • Hey so I've found a really weird bug and would super appreciate if anyone can help me with it.

    The schedule next play event in the audio object works in my test projects, but if I literally copy-paste the code verbatim into my main project, it doesn't work.

    The file that is supposed to be played after the delay just plays immediately no matter what I do. I know the code works because it functions correctly in the test projects, but if I do it in the main .caproj it just doesn't.

    The delay is calculated correctly, I checked via setting a global variable, it just doesn't get applied. I've tried making an empty layout with an empty event sheet (besides the identical code) and it doesn't work. I've checked that the audio objects have the EXACT SAME setting. The code is also THE EXACT SAME. There are no differences, except it works in one project and doesn't in the other.

    ^ This is the code in the main project. It is used in the Event Sheet 1 which is tied correctly to the test layout.

    It doesn't work.

    ^ This is the code in the test project. it is used in the Event Sheet 1 which is tired correctly to the Layout 1.

    It DOES work.

    BUT IT'S THE SAME????

    I've been losing my mind here trying to pinpoint the issue but I can't for the life of me. Please, can anyone help with this predicament? I know that Construct 2 will never receive another bug fix, but I NEED to know if this is something I can do something about.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turns out the audio wasn't being preloaded correctly in the main project, which was causing the issue. I was going insane. If anyone else has this issue, try enabling the project property for preloading sounds, or try preloading the audio files individually.

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