[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.

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.

1 Like

This worked perfectly, thanks alot!