How do I count how many instances of a class have the visibility of a light component toggled on?

By the way, this is how the blueprint looks

The goal of the game is to turn on all of the lights of a certain kind and turn off the lights of another. I have it so that you can toggle visibility for these kinds of lights. The blue and red lights are separate classes. How do I count how many instances of the blue lights have the spotlight toggled on and how many instances of the red lights have the spotlight toggled off?

You can do it like this:

You’ll find it easier if you do all the light as one blueprint and make the color a parameter :slight_smile:

( Otherwise you’ll need to write another custom event to count each color )