Is there a way to check and see if all booleans from select actors are true?

I have a level with plates that light up when you walk over it. When they light up, the blueprint actor sets “isON” to true. I’m trying to figure out a way to check if a select few platforms are set to true in the level blueprint. Here is my current setup -

However the problem is the string only prints when I step over the last plate in the Array. Regardless of whether the other 2 are on or not. How do I collectively check whether they each have isOn set to true? Any help would be greatly appreciated!

Hello,

This is probably the way I would do it.
(Replace the array, by yours)

2 Likes

You can use the AND node for this

:stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue: :stuck_out_tongue:

For finding if ANY of values is TRUE:
set “result” variable as false.
in loop get “result” and calculate boolean OR with value from array
store it as new “Result” value
You can ad break if Result is true

For finding if all are TRUE do same as above, just change boolean OR with boolean AND

Ps, even simplier, in your graph:
replace for loop node with For each loop with break
connect that node where you set “AllOn” to true with break pin in for each loop

Anyway if you need something different, write states (true/false) of all 3 plates and when you want result true and when false.

Thank you all for your suggestions! I’ll give them each a go and see how it works out. Much appreciated. =)

Had the same issue, used Alex’s suggestion. However had to set the “all true” within the loop itself