#Moving Player Out Of Insta-Death Pit Keeps Killing Them

1 messages ยท Page 1 of 1 (latest)

tiny mortar
#

Attached is my code
For some reason, even after moving the player safely out of the way, they still apparently register as getting hurt by the collider
To replicate: just run this code (no need for the effects) and add a Logger statement at the beginning
I don't understand why this is a problem

tiny mortar
#

For context: I'm talking about death pits like the ones in 106 containment or HCZ Armory

#

I want to teleport a player out of the pit, but when I do the game, for some reason, decides the player is still being affected by pit

#

That lasts indefinitely

#

Or, in my experience, it lasts until the player moves or is updated in specific ways, like using remote admin to disable all player effects

shy forum
#

You have to disable PitDeath effect.

night ridge
#

btw for ServerLogsText compare the translation id

#

instead

#

@tiny mortar

#

but yeah PitDeath is what actually gives the death

#

eg

 if (ev.DamageHandler is not UniversalDamageHandler universalDamageHandler || universalDamageHandler.TranslationId != DeathTranslations.Tesla.Id)
     return;
tiny mortar
tiny mortar
vapid silo
tiny mortar
vapid silo
#

oh true it does execute after the person dies so

night ridge
#

But health is gone

vapid silo
#

wtf

night ridge
vapid silo
#

why does it do that

#

is it onplayerdeath or beforeplayerdeath ๐Ÿ˜ญ

night ridge
#

Dying is before
Death is after

#

You said PlayerDying

#

Which is slightly before

vapid silo
#

i thought they only had one event for player dying not multiple

night ridge
#

should be 2

#

one for before and one for after

#

like a lot of other events

#

Theres Hurt and theres Hurting