How to win ????

I have some question about win system. How to implement win when all enemies are killed? But there bodies are valid.

Would creating a boolean to handle if all enemies are dead work and when that boolean is true, win is displayed?

There’s lots of ways you could do this…

  1. You could keep a running count of all active / alive enemies. When that count reaches 0, the player won! Say you have 10 goblin enemies and one dies. Your game manager could reduce the number of goblins to 9.

  2. You could periodically run a “Get All Actors of Class” to query the number of active monsters. If the result returns 0, then either they have all been killed or the game has not started yet.