I am making a top down mobile dungeon crawler and I am setting up damage to enemies and my player character. I am setting the damage to take place within the weapon BP so I can adjust damge output based on each weapon that can possibly be held by the player or enemy.
I successfully set up damage to enemies by using on begin overlap then “cast to (the parent actor of my enemy characters)” and then “cast to (my player character)” using the player characters variables for when they are attacking. That way the weapon will only do damage when the player attacks. I’ve seen many tutorials use this and it makes sense to me
Where I’m struggling is to do the reverse when the enemy attacks the player. Essentially I’m trying to switch the placements of the cast to nodes so I can instead use the enemy characters is attacking variable (see screenshot). I have come across the “get all actors of class” option but everyone says it costs a lot to run.
I have been searching for this answer and I feel like there should be a simple solution, or maybe I just need it explained simply to me (I am still somewhat new at this)