Event or Get Actor of X

I want to perform an action when a condition is met but I’m unsure about the approach.

When the condition is true I need to set properties on a number of actors (potentially thousands)

Option 1.
Do I, on condition, for each actor set property This feels like a serial process i.e. set property, I mean for each literally returns an array that you iterate right?

Option 2.
Bind actors to an event, when the condition is met update the property on actors.
While this is not an array (I mean I haven’t tried digging into stuff that’s not visible in the blueprints, but it feels like a parallel process but maybe in the backend it’s still implemented as an array.

Which option is better?

thank you

For a lot of actors, number 2.

It’s not an array, all the actors get the event effectively simultaneously.

They all become listeners, and hear the event at the same time.

2 Likes

I would guess probably a third option – set the value in a central location, and then whenever it’s needed in one of the thousands of actors, query it from the central location.

I guess it depends on what your overall goal is though.