Game locks up if when saving after destroying an object

0 favourites
  • 4 posts
From the Asset Store
Match the similar cards with each other and free all animals!
  • I have an object called Platform (which has, you guessed it, the Platform property). If some conditions are met, I destroy this object in its On created event.

    In the On start of layout event, I save the game using the built-in save method. When I do so, the game immediately locks up and I get the following error in the console:

    instance.js:8
    Uncaught (in promise) TypeError: this._wasOverJumpthru.GetUID is not a function
     at PlatformInstance.SaveToJson (instance.js:8)
     at BehaviorInstance.SaveToJson (behaviorInstance.js:3)
     at Instance.SaveToJson (instance.js:20)
     at objectClass.js:27
     at Array.map (<anonymous>)
     at ObjectClass._SaveToJson (objectClass.js:27)
     at C3Runtime._SaveToJsonString (runtime.js:88)
     at C3Runtime._DoSaveToSlot (runtime.js:85)
     at C3Runtime._HandleSaveOrLoad (runtime.js:82)
     at C3Runtime.Tick (runtime.js:61)
    

    Is the game trying to save that instance I just destroyed? How can I prevent it from doing so?

  • Try saving after a small delay, when the platform object has been destroyed.

    On start of layout -> Wait 0.1s, Save Game

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I can do that. I was just hoping there would be a more direct fix instead of just trying to kludge my way around it.

  • The direct fix is making an error report for the bug.

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