Hi guys is there a node that I can use to get who gets the last hit?
There is damage system, look into it. It may have such node, but i doubt.
You can (and need to do anyway for other functionality later on) make enemy as blueprint avtor, add there event for when it is hit. And create array of who hit it, then just add latest instigator to it.
You need to code most of things in game, there are no nodes for higher\more complex functionality, well there are some but those usually have big and complicated system in engine that is merely exposed to blueprints.
That’s a nice idea thanks man! You are greate . It might work with the array of who hits
Last hit should be who caused damage last.
If your setup uses health then use it as flow logic control on the hit event. There’s no point in processing hit logic if the target is dead/destroyed.
On hit event -> if ( health > 0.0 ) -> process hit, apply damage -> set last hit var (player id)
You can take this a step further by having a boolean (IsGameOver?) set in the game mode. Use this with your health check to prevent game end hits from counting.
On hit event -> if ( (IsGameOver? == false) && (health > 0.0 ) )
Too many of them are causing the damage actually the other minion,tower and player . So basically maybe I store all who hit the target on an array and get the last index that process actually is working and tried it earlier and it works great.