Moynzy
(Moynzy)
March 16, 2016, 5:38pm
1
Hi,
When the game begins, the server on the game mode spawns each player controller to posses a pawn.
When the pawns health is below 0 or == to 0, I destroy the pawn by using the destroy actor node.
Does this destroy my custom player controller, because K is my respawn button.
When I press K (whilst my player is alive) I can debug print to screen,
After destroying actor, I press K and nothing happens.
How can I make sure my player controller doesn’t die .
Thank you.
Moynzy
(Moynzy)
July 28, 2016, 6:18pm
2
After understanding the frame work, when a pawn actor gets destroyed the controller will not get destroyed.
One mistake I made many times was getting the controller of a destroyed pawn which resulted in NULL.
Marc_One
(Marc_One)
April 9, 2021, 4:01pm
3
Is there a way then to somehow retrieve the controller? i have a problem that when a character falls of the world, he gets detroyed but i can not spawn a new since i dont have the controller.
Tuerer
(Tuerer)
April 9, 2021, 4:43pm
4
Before the pawn gets destroyed, try calling a [Detach from Controller Pending Destroy] node.
Marc_One
(Marc_One)
April 9, 2021, 5:19pm
5
what if i cant. for example if the actor gets destroyed by falling off the world.
Tuerer
(Tuerer)
April 9, 2021, 5:27pm
6
Try using an event, maybe?
Marc_One
(Marc_One)
April 9, 2021, 6:53pm
7
it is too late when the pawn is destroyed. or something else is going on. i tried exactly this solution.
Did any of you find a solution meanwhile? I am having the same issue right now.