Target & Combat System (melee)

Hey @Dr.Scientist76! Welcome to the forums!

Interesting idea here… So I could give you a rough outline, I think.

So for the targeting system:

You could design a system using a collision sphere (overlap only) on the player, and when an enemy enters it you assign it to a variable (just have 4 empty variables for A,B,X,Y positions) and put that icon over their head on their blueprints using a 3d Widget and an image. When they die or exit the sphere, you remove them from the reference “Slot”.

Create input actions for all 4 buttons, and add them to the input mapping context.

Then in the player, create events for all 4 of those (or reuse what is already there) and use branches. Check the appropriate reference “Slot” using IsValid? checks (or Validated Get) and if the reference IS VALID, turn towards enemy and attack, and if it IS NOT VALID, do the standard thing (such as X for open door vs X to attack enemy with X over head).

Hope that helps!! :slight_smile:

1 Like