Respawn sistem

Hello. I’m new to UE. Help me figure out my problem. I can’t get my actors to respawn correctly in any way. I have multiplayer on 1 screen. What I do: When the player dies, I pass the data of its class to BP_controller and destroy the actor. In BP_controller, I do a life count and pass data about classe pawn, controller and coordinates for the actor’s revival to BP_gamemode. (I can’t use the standard player start because the respawn position is constantly changing. In place of this, I use two empty actors and their positions in world coordinates). In BP_gamemode, I just do spawn actor from class and do posses. Everything works as it should, but sometimes it doesn’t work =). 1) If I don’t set a delay before I destroy the actor, it doesn’t always have time to transmit data about the class. I’ve dealt with that. Although I can’t understand why this is happening, because destroy actor stands after a year with the transfer of data to BP_controller. 2) My actors don’t always revive and I can’t solve this problem in any way. The editor does not give any errors. My actor just doesn’t get over-excited. I have been puzzling over this problem for more than a week. I transmit all the data through the interface. I don’t use “cast to”. Maybe that’s the problem? I ask for help from you gentlemen. I’m at a dead end. PS. I have to transfer data to BP_controller, because there is a delay before the signal for rebirth in 1sec.



BP_GameMod

Greetings and thank you for posting such an interesting question.

Could you show us what PRespawnActor does? I am not seeing that functionality in your screenshots. I apologize if I have missed it.

In the meantime, I found some relevant documentation that may provide some ideas for you.

I look forward to your reply and hope the documentation serves you well.

1 Like



The problem turned out to be the use of interfaces. I redid all the logic to use “cast to” and everything worked for me. Yes, I studied the documentation, but such a system of rebirth does not suit me.

I also had to update “do once” with an unsuccessful cast. I can’t understand for what reason, but sometimes the caste does not work and “do once” is closed and the actor is not destroyed accordingly. This is a bug for immortality)) Anyway, thank you for your concern. Everything works fine for me now. If you could tell us why it doesn’t work when using interfaces, we are newbies - we would be very grateful)

1 Like