Respawning the player

Can anyone help me figure out why my blueprint for respawning my player character death isn’t working?

I’ve been trying to setup the respawn system using the Unreal Engine’s Respawning the Player (Single Player) documentation [Link][1], trying to follow the guide as closely as possible. However, I’ve run into a discrepancy between my blueprint and Unreal’s documentation that is probably the reason why my blueprint isn’t working.

My Blueprint:

Documentation Blueprint:

https://docs.unrealengine.com/Images/Gameplay/HowTo/RespawnPlayer/Blueprints/GHT3B_7.png

The discrepancy I’ve found is that I when drag off of my character’s blueprint to add a Assign on Destroyed node like in the documentation linked above, the custom event it creates differs in that it has a Destroyed Actor pin that isn’t included on the one shown in the documentation.

Also for some reason I cannot hook up the Bind Event to OnDestroyed to my character blueprint like I’m supposed to as shown in the documentation, instead I get a message saying that my character blueprint is incompatible with Self Object Reference.

https://docs.unrealengine.com/Images/Gameplay/HowTo/RespawnPlayer/Blueprints/GHT3B_2.jpg

The page says Unreal Engine 4.9 so maybe the documentation is out-of-date? I’ve followed their instructions to the letter but it won’t let me hook my character blueprint to the Bind Event to OnDestroyed node and I’ve got a extra pin on the OnDestroyed custom event that isn’t present in the documentation’s screenshots.

So what should I do to rectify problem?

it sounds like its a node that is similar but not the one you need (there are some nodes with many versions of it). i would try dragging off of the cast nodes blue pin and then searching for the bind on destroyed. that will give you a bind node that is specific/compatible to the character / actor.

as for the on destroyed event having a extra pin that just a feature that was introduced later and or a side effect of the bind node your using.

on side note im curious as to why you blacked out the name of your actor. i’ve seen a few people do the same but it doesn’t make a ton of sense to me. is it top secret info that would spoil your game, i think that unlikely. also having a more descriptive way to address the BPs your working with would make things easier for us, for example we cant say the “as (insert class name here)” node, instead i had to say the blue pin on the cast.

I just tried searching for Bind On Destroyed, but it just ends up spawning the exact same event with the exact same problem of being unable to connect the event to the character blueprint.

What doesn’t help matters is that there isn’t any compiling errors to tell what’s wrong so it appears my setup is “technically” correct but doesn’t work regardless. The only error messages I get are the ones related to my camera blueprint not having a character to follow upon the player character being destroyed, but problem is unrelated to one as far as I can tell, so I don’t have any feedback whatsoever on what is wrong with the respawn blueprint.

Is there anything that can be connected to either/both the Destroyed Actor pin in the OnDestroyed custom event or/and the Target pin of the Bind Event that might help get thing working properly?

Since Unreal’s own documentation for player respawning seems to be completely obsolete, I decided to scrap the blueprint entirely & take a different approach using [[Link][1]] tutorial I found on Youtube. Instead of the respawn blueprint being contained within the Game Mode blueprint I instead created a new function in my Player Controller blueprint and attached it to my Player Death function.

The end result?

Well, the good news is that the player respawning appears to work perfectly with my character respawning at the start of the level when their health is reduced to 0 with all their functionality intake. The bad news is
that upon the player respawning, the camera is completely borked with the camera appearing to be inside of my character for some reason, as I can see bits of character’s mesh when my character performs certain actions like swinging their weapon or crouching.

All of confirms a bad feeling I had about the camera blueprint I’ve been recently using. The bad feeling I had regarding the camera blueprint is related to topic here [[Link][3]] that I made about problems I was having setting up the camera blueprint, where I was always bothered by the fact that the camera blueprint needed to be manually assigned to a character within the scene. Originally I was worried about how the camera would be able switch to between different characters but after getting the camera working my concerns shifted, once I began seeing these error messages popping up whenever my player character was destroyed:

These errors didn’t start appearing until after I got the camera working which suggested to me that there was a serious problem where destroying the character assigned to the camera would result in the camera becoming completely lost and function-less because of the way that the blueprint needed to be manually assigned with no way of automatically reassigning itself in the event that the assigned character was destroyed.

is why I wanted to change the camera’s blueprint so that it would assign itself to the player character via the Player Controller blueprint, that way if the player character was destroyed then the camera would be still supported by the Player Controller that would then reassign the camera to a new respawned character. I’m not sure if my reasoning is sound or not, as I’m not really a programmer or engineering type so if anyone has any better ideas then I’m all ears!

EDIT: Please check the other topic I linked above for info on the camera blueprint I’m using.

the reason it is technically correct as you put it is that you have the bind in the game mode, and the reference to self is therefore a reference to the game mode so it a bind to when the game mode is destroyed.

ok so i just recreated your script in a game mode of the third person template. the only difference is that i didnt have the cast near the beginning as its not needed anyway. mine worked without issue. i did also find that there are indeed multiple versions of the bind on destroy node and i had to drag off a actor reference to get the correct version. basically one took a target reference to actor and the other took a reference to self. the reference i dragged off of was a get player character node fyi. also my test was on version 4.17 but it shouldnt really matter since you have a newer version and ther versions are pretty close.