#spawn skript with no move with delay

1 messages · Page 1 of 1 (latest)

still gorge
#

You said the answer in your question

mighty sluice
still gorge
#

😲

#

Whats the error

mighty sluice
#

can u type the code after putting "if player world is "world_name" ?

still gorge
#

Buddy

#

Its pretty simple, you've said the answer in your question lol

mighty sluice
# still gorge Its pretty simple, you've said the answer in your question lol
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!"
still gorge
#

Read the error tell me what it says

mighty sluice
#

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

still gorge
#

Indent everything under the if a bit more

mighty sluice
#

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

still gorge
mighty sluice
#

omg lol

#

btw thx for help

#

as if no thing happened

untold lance
#

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(…)

fast zenith
#

Yea

#

(damn bro why am I always late)

leaden saffron