[SOLVED]Respawn and delete enemy

hi, me again :slight_smile:

I have some problems with object variables. For example, I am implementing a respawn of enemies whenever a room is visited.

Each room in the game has a variable called “active”, if the player is in it, receives 1 if it is not receives 0.

For all rooms with status 0, enemies must be deleted, and only those with “active” status = 1 remain. This is where I am not able to proceed with the code. Even using “for each” at each room visit, enemies are deleted even if the room is “active” = 1;

In short, each room that the player has the “active” variable receives 1, and those that are not should receive 0.

[SOLVE] How do I respawn, duplicate, and kill multiple of one enemy? - #2 by arthuro555