Need help with respawning/death script

I managed to make it so respawning takes exp and gold from the pc and teleports me to the waypoint of the death room, the issue with my script is that when i get healed/resurrected theres like 1.4 second before getting teleported to the death room so hostile npcs in the area can kill me a 2nd time, if anybody knows a death/respawning script i could use it would be appreciated mine just sucks i guess i tried hard ahah this is for an online server

You can apply a greater sanctuary effect that exceeds the delay. That would keep hostiles from attacking you again. I can drop a bit of code later when I have a chance to pop open my toolset.

ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectEthereal(), oTarget,9.0f);

You’ll need to define “oTarget” or swap it for whatever you currently use to define the target of the effect.

Post your script so we can see how to fix / improve it.

1 Like

Yes, please post your script. I’m very curious to know why you chose not to use the standard Death Temple system that comes built-in.

Hey guys sorry for the trouble I found a good death system :slight_smile: I think this is solved sorry for late reply