That´s why I moved those ground images (background images) separately (which now looks bad of course). There still was an error.
No, no. Objects can overlap.
The collision polygones insides objects with a physics behavior can not overlap. Worser. Often Construct cant auto find colission polygones when you import a frame. In that case there wil not be 1 collision polygone set. And that gives countless errors if you give such an object a physics behavior.
Lesson 1: When you import an animationframe, check the collision polygones. Be in control.
Ok, here is the capx i looked into.
https://www.dropbox.com/s/tkpi3u9y14di1 ... .capx?dl=0
I have totaly no errors anymore. But then again, i am to stupid to play the whole level. (althaught you can just fall on the lunchbox in the space between the walls on the left, completing the level in seconds)
Best try yourself. I hope you dont have errors too this time.
I did two things. I kinda fixed the animation of your main character. Now it has a stable origin. And stable colission polygones. And it rolls so much nicer.
I lifted the chain creation out of the 'on start of layout', and made it only happen in the levels where they are actualy present.
I am a bit suprised that it all runs at a acceptable pace. Yet. That event sheet is full of unneeded events for a certain level. You have one sheet for all levels. As a result, lots of events check for objects that are not in the layout. I dont understand how you understand all this. Hat off.
The events about the Boss, for example, run in every level.
Would it not be a lot easyer if you used groups ?
https://www.scirra.com/manual/80/groups
You can set groups active & inactive. That way you can still have 1 eventsheet.
Have a group for events that are needed in every Level. Like the events that move the player. This is always active.
Have groups for things that only happen in a certain level, and set this group active based on the level name.
Now, the chain creation, for example, gave objects that are not in the layout and not global, a physics behaviour. The chains are not in every level.
WIth not in the level i mean: they have no grafic representation. They have no 'sprite' and therefor no collission polygones. Because they are not global. Yet they get the physics behavior set. But physics cant find polygones. And then you get that error.
Well thats my 'unconfirmd' analysis of what is happening. Ofcours, i can be wrong (again).
zenox98
You can not account for everything a users does, or tries to do. I agree that this is impossible.
Yet, is it a good practice to allow the physics behavior on objects that are set as not global? Physics is global though ? Else setting gravity in one object would not set gravity for all.