Respawn Player, on possessing, no input is available





I’m trying to get the player to be able to respawn after dying by pressing the respawn widget button, everything seems to work as normal the death widget is destroyed and replaced with the regular player widget, except the only thing that doesnt work is player input, which sucks, i tried putting enable input before and after possesing player to no evail and if theres a youtube video on this then I havent seen it, it just seems like a pretty shoddy problem, like why does input not get enable. I even removed the disable input for the death widget so enable should never have been disabled but still nothing, I set the auto possess player to 0 so everything atleast in my head lines up but it does nothing, is there any work around or just fix would be better, or is the possess node just kind of a bad way of respawning atleast for widgets?

Hey @God_Ozai!

Try using “Set Input Mode ____”
There are a few options:
Game Only
Game and UI
UI only.

Try using Game and UI, and if that doesn’t work, try using Game Only! :slight_smile:

I tried this, but i also found something out, I’m not actually possessing the new pawn, it just spawns the character in and I’m not possessing the new one, still no idea how to fix though


It gets to here, so It spawns the player in but it doesn’t possess it, I tried adding an unpossess node before it and that didnt work either

Which is odd because you specifically put that Possess node there. While ago I ran into another bug with this part of the engine, did you try debugging it in c++? This part in specific:

[UE5.2.1, Bug report] Controller::Possess broken if Pawn auto possess AI.

I’m not sure about c++ I dont know much about that, but I tried another solution to destroy the actor when the player dies, and then on destroyed it calls the possess, that suprisingly worked. But then for some unknown reason when I literally just move destroy actor to the widget so all I do when clicking the button is destroy the player character which I did before but now it doesnt even work, like what is this

Yes it doesn’t sound right. It’s been a while since I dived into this myself but have you tried disabling this?

That is where bugs happen as well (it’s explained in my link). I’ve not documented more about it but I feel it might be related.

your destroying the actor before the respawn logic, so it likely isnt triggering at all.

I’d move the respawn logic to the PlayerController

3 Likes

@Auran131 Is right.

You’re destroying the actor that has the logic- anything after the actor is destroyed (which takes a very small time- enough to execute the next node sometimes, though) is not reliable, as once it’s destroyed its execution stops. I’m thinking it’s getting the spawn node off but the actor is destroyed during that, and so it doesn’t continue to the possess.

You could even just move the DestroyActor node to be right after the Enable Input node- that should do the trick, or at least take out a large hurdle! :slight_smile: