[Solved] Looping a object group to count all objects with a certain variable value

How would I loop a group of objects all with the same variable and count how many are set to a certain value?

To be more specific I have a group of objects all with a bool variable called active. I want to loop through the object group and count how many of the objects have the bool variable “active” set to true and store that number in another variable.

1 Like

Try something long the lines of the following:

The condition will filter the set of objectGroup items to those with the active variable set to true. The action puts the count of the objectGroup items into a scene variable.


This worked perfectly, thanks alot!

I was struggling with a similar problem.
Thanks for the solution! :laughing: