How do I get the health variable from multiple different enemy classes?(blueprint)

I had the idea to have the health of the enemy you’re fighting to be displayed in the corner like in Sekiro, and I figured I could take it from the actor reference I already have for the lock on system.

Is there a node to pull variables by name or some kind of universal variable system I could add to do this?

you’d want an interface to return the health, or an actor component and use GetComponentByClass

1 Like

That actually worked, thanks.

1 Like

If you make those component with an event,

OnLockOn → Actor ->GetComponentByClass(YourComponent)->IsValid->AssingOnHealthUpdated

on your widget spawn. Can be also another neat method.