Download

How to do binding of get health on flying pawn character ...

Hi everyone,

I seem to have a problem when I do a binding in an UMB Widget for getting the health from my float created in my character BP of my flying pawn character.
I am using the flying pawn template in UE4.
Here is a screen grab:

I see how they set it up in third person and first person tutorials but its not working with the flying pawn template.

If I cast to spectator pawn then I cant get health.
At a loss here.

From within the widget use Get-Owning-Player-Pawn. Connect that to a Print-String etc to find what your pawn is called to Cast correctly.
Or it may be easier to go from Pawn instead. Pawn → Widget component → Get-User-Widget-Object → Cast-To-Widget → Set-Health.
Instead of always calling back to the Player-Pawn and casting to that. Or create a Pawn var inside the widget and set that at Game-Start.
Lots of ways to do this, which way you choose is normally decided by simplicity in getting the Widget to operate or the Parent to operate…
But you should watch a few Blueprint Comms tutorials before getting too stuck into this. Zak Parish @ Epic did some good Livestreams…

Great thank you very much. :-))))

Here is it working YAY:
https://www.youtube.com/watch?v=RaxN4-JvnEE

I was trying to cast to a player character. Its a player pawn not character.
I had to divide health value by 100 to set percentage scale 0-1. :slight_smile:

:cool:

Here is more playtesting. Trying to see how my health bar works but its so freaking hard to hit one of those asteroids :slight_smile:

https://www.youtube.com/watch?v=fEvx150cVhw