Hi,
whenever a round in my game ends, there are obviously a lot of actors that will need to be notified. Some units will move, some buildings will produce resources, some AI will calculate the next move…
How would you essentially globally trigger events in most actors without a whole mess of casts and references?
Right now I have a widget button triggering an event in the player controller.
The P.C. has arrays for every type of to-be-notified actors, and multiple for-each Loops triggering “RoundEnded” custom events in the actor-arrays. I can’t even trigger them all in one go, since obviously even though the actor events are named the same I cannot trigger different events from multiple actors.
I also fail to see the advantage of a blueprint interface - since I’d still have to set up all connections manually all the same.
I thought maybe a “Round-ends”-Blueprint component. But that still requires some messaging setup.
Ideally of course would be an event along the lines of “Event Begin Play” - just for ending rounds.
But I guess that does not work.
How would you do it? What would you consider efficient?
Thanks in advance and kind regards!