Hello to everyone, I’m new to Unreal and I’m following the suggestion that all you give…thanks a lot. I have a problem relate to the screen. I created an animation for the attack and added a sword, I use a ‘line trace by channel’ to hit the enemy: the problem is that I want to hit the enemy only one time for animation/attack (damage 1 health), while the linee trace produce multiple attack within one animation (5-6 health depending the situation). How can I say that every animation (click button) has to damage only one time? thanks
I resolved the first problem with some boleans but I don’t think is totally correct. Are there better methods to this kind of situation? The new problem is that I can deal damage at one enemy per time, so I can’t attack different enemies even if they are in the range of my attack
Just have an array of actors, and when you hit an actor first check if the actor is in the array, and if not, add it to the array (AddUnique) and damage it
Every time you start the attack, remember to clear the array, and that should be it
You should then be able to hit multiple targets per attack, but only hit each target once per execution