#Teleport player back to where they originally died.

1 messages · Page 1 of 1 (latest)

violet hawk
#

The summary, the player died, they go into spectator, when the function is called they respawn where they originally died.

function WaveTransition(d: text):
    if {_d} is "day":
        set time in world "world" to 10:09 PM
        broadcast "%time in world "world"%"
        set {Transition} to true
        set {-t} to 150
        wait 2.5 seconds
        set the gamerule doDaylightCycle of world "world" to true
        broadcast "%time in world "world"%"
        set {-t} to 5
        broadcast "finish"
        loop indices of {deathloc::*}:
            set {_p} to loop-value parsed as player
            broadcast "sdchi"
            set {_l} to {deathloc::%loop-value%}
            broadcast "sdi"
            teleport {_p} to {_l}
            broadcast "tele"
            set {deathplList::*}'s gamemode to survival
            broadcast "survive"
        clear {deathplList::*}
        clear {deathloc::*}

on death of a player:
    if {gameactive} is true:
        set {deathplayercount} to size of all players
        if {deathplayercount} > 1:
            set {deathloc::*} to victim's death location
            set victim's gamemode to spectator
            add victim to {deathplList::*}
stuck veldt
#

set {deathloc::*} to victim's death location

#

You're setting the entire list variable each time to the victim's location

violet hawk
#

OH

#

add ?

violet hawk
#

or

thorn copper
#

try that

frigid lance
#

no set it with the uuid

#

do what phill said