How do I preserve room enemies?

0 favourites
  • 2 posts
From the Asset Store
Add calm and a lounge vibe to your games with these 8 tracks
  • 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.

  • Try Construct 3

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

    Try 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)