My latest problem.

This forum is currently in read-only mode.
From the Asset Store
For problem solving, puzzles, bubbles, platforms and other adventures.
  • Does anyone know of any reason in particular my game may crash when going back and forth between layouts. The games getting pretty huge but I went back and tried this on earlier, smaller versions of my game and I am having the same problem there.

    Basically I have 2 layouts, I load into one of them and I can switch to the other one once and then back again, the second shift to the second layout crashes me everytime, when I debug it says it may be a bug in construct, any suggestions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well i dont know how it is in your case but from my expirience such crashes are an effect of coliding events.

    in my case, for example it was two contradictory events. One said to empty the sound cashe at layout end when the other leftover event claimed to load so sounds at the layout end.

    another this is if you write an event that orders Construct to do something AFTER going to other layout

    for example

    When X happends ->

    -Go to Layout Y

    -Change animation frame of ABC to 2

    so construct did as you ordered him and he changed the layouts but then he tried to do the 2nd thing you asked him and change the animation frame of an object, but the object stoped existing as you just left the layout and blam - my game kicked back to the windows desktop telling me the same error message you seen.

    In your case there must be some sort of conflict betwen sswitching layouts and propably Global Vars.

    the only thing you can do is check your events sheet line by line looking for conflicting events.

  • I think I have figured out a way to do this without changing layouts. Thus avoiding a bunch of other problems I wasnt sure I could do with a multilayout design. Most importantly persistant levels. I made an inventory system which moves all of the objects off screen so I can have multiple backpacks, it took some doing but it works like a charm, I am thinking I can apply this same technique to levels. When you switch levels all of the level objects will be moved off screen and all ai disabled, then the player will be moved to a different layer and all of the objects will be recalled to their position in their corrisponding level. It's cumbersome but at least I'll be able to modify it and control it my own way. Hopefully the ton of sprites off screen won't cause any problems.

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