- Home /
How to know when turn is over in turn-based game
Okay so in my game you move in turns and so do enemies, barrels, bosses and so on. Problem is how do I know if everything is done doing their thing. So I want to know how I can check if every enemy/barrel/boss has finished executing its "turn". These turns can be attacking or walking and other stuff that happens over time which means its not as simple as just checking when the player doing his thing.
Answer by cjdev · Sep 03, 2015 at 11:56 PM
You could create a global list of GameObjects and have each object add itself to the list at the beginning of the turn. Then when it is finished with it's turn it would remove itself from the list. You can then see when the turn is over by checking if the list is empty.
Yeah I had hoped I could avoid that but I guess that's my only option.
Your answer
![](https://koobas.hobune.stream/wayback/20220612002520im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer on object disabled after level reload 1 Answer
Object over terrain 2 Answers
Turn Order 2 Answers