# Respawn sistem 

**URL:** <https://forums.unrealengine.com/t/respawn-sistem/559392>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 17, 2022, 2:32pm UTC](https://forums.unrealengine.com/t/respawn-sistem/559392 "2022-05-17T14:32:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![segamanov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@segamanov](https://forums.unrealengine.com/u/segamanov)\
**Post date:** [May 17, 2022, 2:32pm UTC](https://forums.unrealengine.com/t/respawn-sistem/559392/1 "2022-05-17T14:32:47Z")

</div>

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_copter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/d/96d9a4c93b2dcbf040a99df9147f01f5ed06f5bc.png)  
 ![BP_controller](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/f/9/ef998811465497ecaa7870f2de65352ad3c008d7.png)  
 ![BP_GameMod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/f/22f04a529dc47d8e6c5a1c11cf5698f26fa66dc0.png)

---

<div class="post-metadata">

**Author:** ![Polite\_Muon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Polite\_Muon](https://forums.unrealengine.com/u/Polite_Muon)\
**Post date:** [May 19, 2022, 9:43pm UTC](https://forums.unrealengine.com/t/respawn-sistem/559392/2 "2022-05-19T21:43:01Z")

</div>

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](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/HowTo/RespawnPlayer/) that may provide some ideas for you.

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

---

<div class="post-metadata">

**Author:** ![segamanov](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@segamanov](https://forums.unrealengine.com/u/segamanov)\
**Post date:** [May 20, 2022, 6:34am UTC](https://forums.unrealengine.com/t/respawn-sistem/559392/3 "2022-05-20T06:34:41Z")

</div>

![P_Respawn_Actor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/2/172400f5a5a43a71391ae86f0e0bd696ab48f823.png)  
 ![P_is_PLayer_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/d/d/5dd56dca7f6b2c78fa446885a0060bd29f4f8269.png)  
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.  
 ![BP_Copter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/6/02620148f26eee379ec498b7374d124fc0b6f565.png)  
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)
