google for BOOLEAN ALGEBRA.
You have nodes: AND, OR, NOT, XOR , pick those binary versions.
First check if light color is equal some value (type == to get equal node, or just “equal”)
Do that for all lights.
Then light A and Light B result , and use branch node, there you have if its true or false.
Or you can use loop.
- get all actors of class (select class of your lights).
- then check if light color is equal to value you want.
- every time its equal increase some integer counter variable
- if that counter is >= 2 then light last one