0 Favourites

How do I preserve room enemies?

  • Hi guys,

    I have a problem, and maybe u can help me. I have a room generation system in which I assign a layout to a room. Same layout can be assigned to many rooms. At the start of each layout, I spawn the enemies through spawners placed in the layout. So now, what I want to do is to not spawn the enemies I have killed, and spawn the enemies that were not killed. I can do this with the persist behaviour, but I as I said, I use the same layout for different rooms, so the enemies from the room 1 are not the same than the room 5.

    If someone knows a workaround for this, I would appreciate it, thank you.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Finally I did it with an array.

    A bidimensional array in which I save in the 0 index the room UID and the subsquent index the IID of the enemy spawners when I kill the enemy that belongs to that spawner.

    So if I go back to that room, and the IID of the spawner is in the array, it does not spawn anything

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
99 10,152
karshinkoff's avatar
karshinkoff
Unread hot topic
62 5,915
Nesteris's avatar
Nesteris
Unread hot topic
56 4,734
MPPlantOfficial's avatar
MPPlantOfficial