Hey, everyone. I’m having trouble trying to make this work properly. I have actors in the scene that have lights in it and I use the GetActorsOfClass to round them up and used a For Each Loop to access the Rect Lights and set it’s visibility vise-versa using the Flip Flop. However, it works half as expected. Meaning I can get the actors on the scene, but only 3 actors have their lights turned off and the other half stays on and whenever I click the button again, the first 3 actors now turn on and the second 3 actors now turn off (vice-versa). I’m unsure what I did wrong here.
The number of actors in the scene and the length of the array are equal and it seems that when I add the Flip Flop node, the issue occurs. But when I remove that node and directly connect to the set visibility false, all lights turn off.
It makes sense. Flip Flop remembers its state during the loop. So when you flip the 1st light on, the 2nd one will be turned off. The 3rd one will be on, and so on… (and off)