Send Event to all instances of an Actor Component

I have a Actor Component called TargetManager inside my AIController, when a new target is percieved by the AIController I call a function inside the TargetManager to add it to a Target-map variable.

I would like to call an event dispatcher from the TargetManager when this happens to let all other TargetManager Actor Components know, so they also could update their Target-map variable.

Is that possible?

It would of course be better to only store one Target-map variable that’s shared among all the AI in the level, but not sure whats the best way to do that.

you could create a ‘team manager’ which then has a reference to all the AIs. place it on the gamestate and as AI’s spawn they can add themselves to the team.

otherwise you can use getallactorsofclass/ with tag etc

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.