[SOLVED] Wrong order of events regarding collision and position change

I found a bug in my game and made a minimal example of it. You can find the zipped project at this link: EventsheetSpawningBug.zip - Google Drive

The problem is as follows. This is what the scene looks like:

And this is the corresponding event sheet:

Now, according to eventsheet, if the player collides with lava, the expected behaviour would be that the player is repositioned to the right. After all, the events are executed from the top to bottom, and the repositioning to the right comes last. However, in this example, the player is actually repositioned to the left.

this bug occurs as well on the online editor as on my Windows 11.

It’s working as intended. The object is moved with the first collision so it can’t collide with the lava a 2nd time. The object property is updated immediately while the screen isn’t redraw until the events are all processed.

2 Likes

Oh this makes a lot of sense actually! My bad. Thank you.

1 Like