Verse Library verse

01 Fragment

Checks if players fall below a kill floor height and automatically teleports them to a respawn pad.

verse-library/verse-char-arena-capstone/01-fragment.verse

# Catch a fallen player: read the body's height, hand them to a Teleporter.
for (P : GetPlayspace().GetPlayers(), Body := P.GetFortCharacter[]):
    Here := Body.GetTransform().Translation
    if (Here.Z < KillFloorZ, Who := Body.GetAgent[]):
        RespawnPad.Teleport(Who)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in