hello, I need help on a mechanic, in my game I would like that when the player dies (it’s a multi game) to respawn as a “zombie” in short that he changes Blueprint character, I I had tried something with the possess node that I had placed after my character death event, and I had the zombie class afterwards, I was wondering if it was the best choice? Or what if there was another way to do it? knowing that when the players die and “respawn” as a zombie afterwards he has no hp basically he is immortal and will no longer be able to die unless the game ends
Depending on how exactly your running your game that may be the best approach, though you could always just change, you player classes skektal mesh, animations and abilities/ia on death, what you’ve got going is probably the better way to do it, swapping all that stuff smoothly is a bit of work
There is a destruction event you can use.
You can also use the event unpossessed poteintially assuming you’re working with a pawn or character:
Then it happens when the player/ai controller unpossesses the character
The proper place to do that would be in your GameMode
as it is responsible for finding player spawn location in mp and assigning them pawns.
There are multitude of functions you can override like FindPlayerStart()
, SetDefaultPawnForController()
, SpanwnDefaultPawnFor
, OnRestartPlayer()
. And yes - possess logic can be put in there. You just have to track weather the controller had already played with normal pawn in order to know where to spawn and what pawn to assign.
thank you very much guys it will help me a lot