I tried to change “Get player pawn” to “Get player controller”. This eliminated errors but enemy bullets were flying in a very weird way, not at the player at all.
So this leads to my question from the topic title: is there any way to force player pawn to keep same player index, even after “destroy actor” and respawn?
Pretty please, help me somebody!
PS. When I plugged “print string” node to “Get my player index” it says “-1” all the time, even after respawn
You could rumble through all the pawns with a foreach, casting to find the player. Or, what about putting an actor tag on the player, then you can use GetAllActorsWithTag? ( maybe )
Thanks for tips but I made it the hard way
I was struggling with this problem for few days now and I had to give up. I mean, I gave up on solution I described above. I rebuilt quite a lot of blueprints and whole respawn system. Right now instead of destroying player pawn on death (as the documentation suggested), I’m just playing the blueprint from the very begining. Player index stays the same, logs are clean as a whistle.