Health System not working with UMG

So I have a question… Is it because the float isn’t right? Or how the event in the FirstPersonGameMode is?

Hi there,

Could you please specify your issue a bit more I am not even sure about your problem. What exactly are you trying to achieve?

Basically kill the player when the health is at zero. then get the player start’s transform and spawn there, like in the one in the documentation.

Where do you call your ‘Death Event’ function? Also may I ask whats the purpose of checking the Current Health in there? Shouldn’t you call the ‘Death Event’ after you checked the health of the player and it is 0?

Hmm, never thought of it, let me try.

Okay, just get back here if you can’t get it to work I’ll try to help you out.

Wait do I put in the death event then call it in the player blueprint, or do I put the death event in the game mode.

Did you get my last comment?

I think you should do something like this:

-Set up a system that deals damage to the player (a volume would be perfect for testing purposes)
-When you deal damage to the player (eg. -10HP) after you subtracted the damage from the Current Health variable, you want to check if it is greater than 0. You can use a branch node here, if it is greater than 0 you do nothing, if not, you call the ‘Death Event’. (The setup of your respawning system seems fine at first look).

Are you familiar with Casting or Blueprint Interfaces? Most likely you will need to use one of these metholds in order to communicate between your Blueprints.

Okay, thanks.

I didn’t see your last question, I would put the Death Event in the Character Blueprint.

ok so would it look like this?

This is on the game mode.

It doesn’t look right, you are calling the Death Event right after you Posses your Pawn. Also, please upload a screenshot for each of oyur Blueprints where I can see the nodes together.

The Death Event function should be called after a set of nodes that checks the health of the player. What deals the damage to your player?

Of the death event or the health?

A simple cube that rotates, just for prototyping.

First, I don’t get that ‘CallDamageEvent’ node. Is that some built in thingy? Anyway, I still do not see that you check if your health is not 0 (not in the Death event, thats not the right place for it). I think you should think about it in logical steps.

Basically you want to deal some damage to the Player, check if he still has health after the damage, if not, call Death Event. In there, you setup the respawn system (what you’ve already done as it seems).

It looks like that you pretty much have your system already setup, you just need to finish the puzzle and connect them in the right order.

Well that makes more sense, anyways I’ll will figure out what is causing the issue, but yeah thanks for trying to help!