Game crashing when new audio plays.

0 favourites
  • 5 posts
From the Asset Store
This Student Workbook uses both Construct 3 & 2 encoding. It supplies client-side & php "back-end" encoding.
  • Yesterday I updated to the newest version of Construct 2 and ever since then have been having this problem.

    Basically I have the game set up to change songs when a specific NPC is on the screen. It seems the game crashes now when it has to load the song. Depending on the browser some sound effects don't play or sometimes no music at all as well.

    Here is a link to the .capx

    It happens if you just walk left after running the file. Mostly in Firefox.

    The error that pops up says:

    "Javascript error! TypeError: this.gainNode is null localhost/Audio_plugin.js, line 1432 (col undefined) This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!"

  • I had no problems ran. the game almost a dozen times. Just walked left. watched the debug to see if the music started playing. and no problems with crashing.

    However when you want to play earthbound franky. REMOVE THE EVERY TICK condition.

    Also as a suggestions.

    Make one Ground sprite and use frames instead of a different sprite for every ground block.

    Use PLAY not Positional Play for music. Unless of course you want your music to have area effect. However most of time that's not really the case. As an example. walking into a Night Club with a band or music speakers; then you would use positional audio to represent the band having a position and distance.

    Didn't you file this first as a BUG report?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah I initially posted there because the error said I should report it. Sorry if I shouldn't have. It was only afterwards did I think that I should double check first.

    Thanks for the help though, especially with the ground tiles that should probably keep things from slowing down later on.

    For the music I was trying to get the Positional Play working initially but I couldn't figure it out so I just tried Play when on Screen. Positional audio would make it so the music would fade depending on how close you were right? That was what I was trying for.

    I guess I'll just continue working with the audio disabled for now though.

  • as mentioned "remove the EveryTick for you condition" when playing the sound. That's the reason the music stops and can certainly lead to your system crashing.

    so I answered your question to the problem at hand. So why do you need to disable the audio?

  • If you think it's a bug please report it to the Bugs forum following all the guidelines.

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