#Spawn with on move cancel
1 messages · Page 1 of 1 (latest)
how?
Set the block underneath the player and check if the player isn't on the block anymore
when doing the command save position in a variable and check the distance and cancel if it's too far
send "Canceling teleport to spawn."
stop```
i would probably do like 0.2 so tiny movements don't cancel it
distance between {_loc} and player > 0.2
if location of block at player is not {_loc}: Could be better?
cooldown: 3 seconds
cooldown message: &cYou are using this command to much, slow down!
trigger:
message "&7Teleporting in 5 seconds. Dont move!"
wait 5 second
teleport player to {spawn}
message "&7Teleported you to spawn."
command /setspawn:
permission: spawn.set
trigger:
set {spawn} to player's location
on join:
wait 2 ticks
teleport player to {spawn}
on respawn:
teleport player to {spawn}
distance between {_loc} and player > 0.2```
how to I format
🤨
idk what to do D:
Well you'll need a countdown, then in the countdown check if the player isn't on the block
HOw
if i knew what to do I wouldnt have made this
command /spawn:
cooldown: 3 seconds
cooldown message: &cYou are using this command to much, slow down!
trigger:
set {_loc} to player's location
message "&7Teleporting in 5 seconds. Dont move!"
wait 5 second
if distance between {_loc} and player's location > 0.2:
send "&cYou moved, teleport cancelled"
stop
teleport player to {spawn}
message "&7Teleported you to spawn."```
you could use a while loop so it instantly cancels the teleport when they move rather than waiting 5 seconds to check
or just loop like 5 times and in the loop, wait 1 second and check for the location like above
Yes 👍
That's for you to figure out, we already gave you the solutions
No you didnt
I dont know what I am doing with loops
Literally just told you :/ #1050152376654364773 message
why are people in minehut like this bro
they expect you to know everything
do you know how to make a loop?
You can't google or what?
No I said that
No
!docs
Skript Documentation
Skript documentation, sometimes referred to as "the docs" are a great resource for beginners learning skript or experts reviewing a topic. They hold a wide variety of information on various events, conditions, effects, and expressions. Here’s a few popular documentation websites:
• Skript Lang Github
• Skript Hub Docs
• skUnity Docs
• Bukkit Dev
• skUnity Parser - Another great tool is the skunity parser, which can parse (run) your skript code in a web browser and check for errors!
loop all players:
why you looping all players
tarna told you
#1050152376654364773 message loop 5 times: He even said it in his message
cant understand event loop 5 times
It's not an event my guy
exactly
learn skript basics...
you just give me this bunch of words and expect me to know where to put it
Here ya go https://skripthub.net/tutorials/17
thats why you learn skript basics
idk you tell me
how am i suppose to tell you if you dont show me what you did?
cooldown: 3 seconds
cooldown message: &cYou are using this command to much, slow down!
trigger:
set {_loc} to player's location
message "&7Teleporting in 5 seconds. Dont move!"
loop 5 times:
wait 5 second
if distance between {_loc} and player's location > 0.2:
send "&cYou moved, teleport cancelled!"
stop
teleport player to {spawn}
message "&7Teleported you to spawn."
command /setspawn:
permission: spawn.set
trigger:
set {spawn} to player's location
on join:
wait 2 ticks
teleport player to {spawn}
on respawn:
teleport player to {spawn}```
well u need to indent
indentation wrong!
also that wont do jack
do you know what a indent is
Yes omg
https://skripthub.net/tutorials/33 here, pretty good
then put it
mf
Actually shows you how to use indentation and where to use them 👍
got any idea on serialization of an array in java? mr tesco
Maybe if you guys accually helped I would be done
we are
💀
Nope, isn't that like partially advanced stuff?
I can't even say the sentence out loud for gods sake!
We gave you possible solutions and relative material, I would call that helping
Not at all
Those websites dont help
They do, they show you how to actually do the stuff the right way
No
Do you expect us to spoonfeed you or something? If you don't want to deal with the hassle then get a Developer to make it for you in #job-board
You probably dont even know what to do
Totally 😉
Mhm
Its very very true
I'm not saying that it isn't true
xD i learnt this my first day of skripting/coding xD.
just spoonfeed him at this point bro
alright yea
trigger:
set {spawntp::%player%} to true
wait 7 seconds
if {spawntp::%player%} exists:
execute console command "tp %Player% -848 63 -836"
delete {spawntp::%player%}
else:
send "&cYou Moved! Could not TP."
on player move:
{spawntp::%player%} exists:
delete {spawntp::%player%}
might not work just coded it on discord.
!spoonfeeding
Spoonfeeding
When helping other players, please refrain from spoon-feeding the information. This is where you give someone the solution without letting them figure it out and learn from their mistakes. It might solve their issue but it won’t allow them to learn how to fix it in the future.
Instead, you should work with them and help them learn to figure out the solution on their own.
Yea, docs are really helpful imo
Might as well spoonfeed if its been this long and he still did not understand
true lmao
thats how i learned
💀
i got spoonfeeded a tiny bit but then i got told about docs
and now my life has changed for the better cause spoonfeed = bad
trigger:
set {spawn::%player%} to true
wait 7 seconds
if {spawn::%player%} exists:
teleport player to {spawn}
delete {spawn::%player%}
on player move:
{spawn::%player%} exists:
delete {spawn::%player%}
send "&cYou Moved! Could not TP."```
Do this its what @charred light said but the send will be faster (cause its in the on player move function)
You mean event?