Currently, my character/Mech casts a sphere around them, creates an array of targets out of actors that contain the Targeting component Ive created (to make sure they are valid). From there, I have logic that grabs the closest target, then lets me cycle through the rest of the targets (This is like targeting in Mechwarrior games that I am trying to emulate). That bit works great.
So from this array, I grab Current Locked on Target ID and set that variable. From there, I get lost on how to communicate with my HUD properly. Im new to this part of Unreal.
Between BP_MainCharacter, BP_EnemyBaseClass, and BP_HUD, I need my character to grab the closest target, and then I need to grab that closest target’s stats.
BP_EnemyBaseClass has a BP_Stats component where I keep its health/shields/whatever. I want the Health/Shields/Whatever of my current target to display on my HUD.
Whats the “right” way of doing this process? Is it casting, is it using dispatchers somehow? Im lost.