I want to create an Event Dispatcher on enemy death.
My issue is that enemies spawns AFTER that game has started, thus I can’t make a Bind on event at begin play.
explanation: As I understand, to make the playerCharacter “listen” to the dispatcher I need to have a reference to the enemy and from that reference I need to “Bind on” event.
Since at begin play I do not have an enemy to reference to and since I don’t want use casting during gameplay to create the reference, I have no option to listen to the enemy.
So this is what I am asking. Can I make the player Character listen to the dispatcher coming from the enemy without using casting?
I know I can make use of the the GameMode by making the game mode do the Dispatch.
By casting to game mode at Begin play of the enemy and when an enemy dies he Call an event from GameMode that will trigger the Call dispatcher event.
And the player will listen to the Game mode.
However it doesn’t seem right that the enemy will not dispatch his own death…
I hope I make my self clear …