Respawning An AI Character

Hey i’m trying to respawn my AI Character after a delay when it’s health reaches 0. I Also have a specific location where I want it to respawn however the character just doesn’t respawn? Attached is my code, where am I wrong here?

Thanks in Advance!

Hey there @NattyMatty! Are these nods on the AI character itself? As when it gets destroyed none of the rest of these nodes will run. What I’d recommend would be to either

Handle the destruction and spawning from another actor/blueprint

or

Instead of issuing a destroy command, you could turn off actor visibility, reset the variables of the actor, move it to the spawn location, then heal it, and make it visible.

1 Like

Hey thanks for the quick reply! Im liking the idea of toggling the visibility and moving the character to the location however I cant seem to get him to go thereim using the ai move to node?

Instead of AI move to, just set the actor location and you should be good, just make sure it’s spawn has nav mesh so it can reattach. Also minor nitpick (that could end poorly depending on how you’re leading into it) I see you have executions leading to your toggle visibility, this is ok as long as they all don’t fire +/- 1 second of eachother, since there’s a delay node after, things can get quite odd if they can all fire separately and cause the entire respawn sequence to refire multiple times.

1 Like

Managed to get a working version basically moving the actor first then toggling the visibility, then set the movement mode to none so it’ll wait till what I need to occur occurs, then reset the visibility and moved the delay node to a more appropriate spot and all works good, thankyou very much for your help! Much appreciated!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.