I need a counter for all actors with specific materials and to display "You won " when all actor’s colors are red.
When an actor is hit by the player it’s colour is changed to red and when hit by another actor its changes to yellow. I need a counter to display the number of actors who are not yet red. I assume it can be done by creating a variable with the hardcoded number of all actors and then doing -1 when painted by the player and +1 when by another actor but maybe there are some better ways?