I’m using the default guide for making a character respawn but it is not working. In the picture attached you can see the blueprints.
What am i doing wrong?
Thanks in advance,
Aalmoes
I’m using the default guide for making a character respawn but it is not working. In the picture attached you can see the blueprints.
What am i doing wrong?
Thanks in advance,
Aalmoes
What part of it isn’t working? And is your cast failing?
The cast is working but it simply doesnt respawn the plane
Hmm… Not sure what to tell you.
Yeah its weird because everything is the same as in the tutorial yet it doesnt work
Make sure on your BP, auto input is set to player 0 in the details panel.
Just changed that unfortunately it didnt fix it
Right click on your spawn actor node and add a breakpoint, then when you test it, see if the breakpoint is hit. If the breakpoint is hit, it should pause the game and show you the spawn actor node.
Thanks for the help by the way. It does not hit the breakpoint. I think the event is not being triggered at all…
It stops hitting the breaking point at the bind event on destroyed
You are binding onDestroyed, but you are never calling it.
Where should i call it? i’m kinda new to the unreal engine 4
Well, it looks like when flying pawn is destroyed, it will spawn a new one, is your pawn being destroyed?
So it destroys it but never spawns another?
Yeah pretty much. Whenever i hit something it dissapears and shows the smoke and explosion. But it never creates a new one
Hmm… Why do you apply damage if you remove it manually?
For the structures around it to break. They wouldnt break if i removed it manually
Hmm… I’ve never bound events, so I’m not sure I can be of further help.
Here is what I think is the issue. Inside your game mode, you try to bind an event to the player’s character but the player’s character is not necessarily initialized before the game mode’s BeginPlay is executed. Try adding a delay node after BeginPlay to verify. If it does work then, then you know the order of initialization is the issue.
If so I would suggest moving the respawn logic over to the pawn blueprint’s Event Possessed or some other event that assures you that the pawn is initialized and possessed by the player controller.