Hello, I’m trying to make a basic multiplayer FPS.
As a first thing I want the “death” of a pawn to be correlated with an unpossess state rather than destroying the character, and its respawn to be related with a possession and repositioning of the pawn.
So the logic is: if Health <= 0 then unpossess, delay-> set health 1, transform and possess.
I made this blueprint in FirstPersonCharacter blueprint:
So what it does:
-when F key is pressed the character loses .25 of his HP
-if Health gets below or equal to 0 the character is unpossessed
-After a delay of 5 seconds health is restored
-then after health is restored the compare float is again executed, this time health is > 0 so the player should control again the pawn, but it doesn’t work
Everything works till health restoration, I lose control of the character, but I don’t take it back.