#spawn skript with no move with delay
1 messages · Page 1 of 1 (latest)
i got error
can u type the code after putting "if player world is "world_name" ?
command /tfspawn:
trigger:
if player is in world "name":
set {_cooldown} to 3
set {_loc} to location of player
while {_cooldown} is not 0:
remove 1 from {_cooldown}
if distance between {_loc} and player is not 0:
send "&cyou have moved!"
stop
set {_loc} to location of player
wait 1 second
make console execute command "tp %player% 10.50 -16 15.50"
send "&ayour teleported!"
Read the error tell me what it says
1s
command /tfspawn:
trigger:
player is in world "name":
set {_cooldown} to 3
set {_loc} to location of player
while {_cooldown} is not 0:
remove 1 from {_cooldown}
if distance between {_loc} and player is not 0:
send "&cyou have moved!"
stop
set {_loc} to location of player
wait 1 second
make console execute command "tp %player% 10.50 -16 15.50"
send "&ayour teleported!"
in the game doesn't shows any error but it work for all worlds
Indent everything under the if a bit more
like this (A) :
if something:
1 space
2 space
or this (B) :
if something:
1 space
2 space
or this (C) :
if something
1 space
2 space
wich one is correct ?
sry if i stupied cz my english is not well
i mean every line 1 more space or all lines uner if with 1 space
Um
Why are you setting the location again in the loop?
At the end theres a bunch of wacky indentation
Why are you trying to use a while loop there?
Could loop cooldownInSeconds * 4 times: wait 5 ticks if distance …: send “u moved” stop teleport player to loc(…)
he indents everything everywhere