Game Event randomly not working

Hi !
I have a problem that I don’t fully understand and I don’t know what to search for in the forum, I need your help.

So a brief context :
My game is a Binding of Isaac style, with random room and random enemy spawn each time you enter a room.

The easiest to code for me was : each time you pass the door, every element is deleted, the character is teleported back to the entrance and the game generates another extern scene and some enemies.
Everything is fine most of the time BUT, once in a while, one event doesn’t work.

2 exemples I’ve seen so far :

  • Sometimes, in the few enemies spawned, one will be unkillable, while the others are.
    (I have 4different mob possible in my game right now, it can happen randomly on every type)

  • The door doesn’t work if all of the enemies are not dead, but sometimes it will not work even if all the enemies are dead.

(I’ve already check if the spawn zone was correctly configured to avoid spawn outside of “the room”)

I don’t know what to search exactly to correct since sometimes the game will run perfectly and sometimes one of these exemples will happen.

Do you have an idea of what could cause this?
Thanks for you help in advance ! :slight_smile:
(and sorry for the bad english)

Hello, Oskour and welcome!

I don’t know if I’ll be able to help you, because I don’t have a deep knowledge of Gdevelop 5, but I can tell you that anyone who wants to help you will need printscreens of your events.

A tip would be to patiently use the debugger making tests and check your variables and other informations when a bug occurs.