No Cast to MyCharacter_C, only MyCharacter

I try to cast to MyCharacter_C, but there is only MyCharacter and the variable that I’m trying to access doesn’t accept that.
30707-

Try using the “Get Player Character” node and plugging it into the “Object” input of “MyCharacter”. Please note that this cast has to be in the chain of events too for it to fire!

Thanks! That works fine now. My death handling is still not working, here’s my death blueprint in MyCharacter:
30709-

Be sure to mark my answer as “Answered” as it helps with tracking purposes!

In regards to your death blueprint, I’d move the second half (After the first print string) to it’s own event which you call after the health has been set. I don’t understand why you have a custom event tied to the branch either as the “Event Hit” is an event all in itself.

What I would do would be do an overlap event (Not a hit event).

To debug your code, you could always use Breakpoints, which would be SUPER-HELPFUL for finding where you code is going wrong.

sorry for bad quality but here’s what happens in game. If you can’t tell, after the character is supposed to die, the health meter just keeps going down.

30711-damage.gif

You should’ve really created a new Answerhub for this :stuck_out_tongue: In your code where you “Set” health, first make sure that “Health” is Equal or less than zero (Float <=" and connect it to a bool :slight_smile:

Okay, I’ll make a new one right now :slight_smile:

Could you check out my other question? https://answers.unrealengine.com/questions/176344/pending-kill-for-destroy-actor.html