Next random level after killing all enemies

Hello, here is the thing. Im making roguelike(Yay, another one!). The idea is simple, handcrafted levels and random order. After I “code” basic logic with movement/health/shooting etc I stuck.
I want to “spawn” some kind of door/portal to another level after I kill all enemies. And I dont know how to track my enemies life. I use health extension, I succesfuly can kill enemies and “delete enemy object” after health reach 0. Thing is when I delete enemy object, my portal doesnt work, becouse it cant read enemy health. Couse its deleted. Any idea how to kill enemies in different way or how to track number of enemies on scene and then spawn portal when all are deleted?

Use the Number of object instances on the scene condition to find out how many enemy objects are still in play:

1 Like

Ill try that! Many thanks!