How to pass the actor reference through event dispatchers

Hi, I built an actor called EnemyActor with an event dispatcher called “hasDead”. When the enemy has dead, the EnemyActor will call its “hasDead” to represent its death.

Our character’s UI is “Battle”. In the construct, the battle ui gets all “EnemyActor” then it tries to bind all event dispatchers of these enemy actors to an event. Each time an enemy is dead, this event will response. But why here I can’t bind to this event?

If I cannot do this, is there any other solutions to let the UI knows who is dead?

Try binding the dispatcher to the actual event, and then call create from that.

If there are 100 enemies in the level, how can I access the actual one?

By having an interface you can interact with it on hit/via damage/or button/trace and call a function from there. Your Blueprint can inherit this function and this can be executed when called with the right procedure/action. It depends what you want the event to do. Damage works fine, or to open a door too, as well as retrieve a variable like name/stats/location .

You can then have any AI character be a child of a master AI blueprint and inherit anything you put in the master blueprint, i.e. damage interface, interact able functions like retrieving data i.e. talking and stats that you wish to give all your AI Characters like health stamina experience, so everytime you create a new AI you can make it a child blueprint and it will always inherit theparent functions.

When the damage interface gets called and after damage has been applied you can call a check to see if the health equals zero and therefore execute a function.

The damage interface interacts with the actor that calls it and should only affect the character it is called from.