Biegnoncy:
Hello guys!
I have little problem in my shmup game. Right now I have respawn event created based on this:
https://docs.unrealengine.com/en-US/Gameplay/HowTo/RespawnPlayer/Blueprints/index.html
Here’s my blueprint:
Everything was alright until I made certain enemy attacks (where they are shooting at player):
Problem is, when player get killed and respawn, player index in “Get player pawn” changes. After that, naturally, log gives me this:
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 )