Help to Changing Movement Cancelation

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Sahara

Member
Feb 10, 2024
2
0
1
23
command /testrtp:
trigger:
set {_l} to player's location
set {_p} to player
send action bar "&7Teleporting in 5" to {_p}
play sound "entity.enderman.teleport" to {_p}
if player's location is not {_l}:
send action bar "&c&lTeleport canceled: You moved."
stop
wait 1 seconds
send action bar "&7Teleporting in 4" to {_p}
play sound "entity.enderman.teleport" to {_p}
if player's location is not {_l}:
send action bar "&c&lTeleport canceled: You moved."
stop
wait 1 seconds
send action bar "&7Teleporting in 3" to {_p}
play sound "entity.enderman.teleport" to {_p}
if player's location is not {_l}:
send action bar "&c&lTeleport canceled: You moved."
stop
wait 1 seconds
send action bar "&7Teleporting in 2" to {_p}
play sound "entity.enderman.teleport" to {_p}
if player's location is not {_l}:
send action bar "&c&lTeleport canceled: You moved."
stop
wait 1 seconds
send action bar "&7Teleporting in 1" to {_p}
play sound "entity.enderman.teleport" to {_p}
if player's location is not {_l}:
send action bar "&c&lTeleport canceled: You moved."
stop
wait 1 seconds
make player run command "/advancedteleport:rtp world" as op
play sound "entity.experience_orb.pickup" to {_p}

currently this is a movement cancelation system when teleporting
im trying to find how to still use movement cancelation but can move your head / move crosshair
 
First of all you should be using a loop for this. loop reversed 5 times:. You can use loop-number to count down from five, instead of putting the number in your action bar message. That way you don't have to write the same code 5 times. For the head movement thing, check the distance between the location rather than if the two locations are the same.
 
First of all you should be using a loop for this. loop reversed 5 times:. You can use loop-number to count down from five, instead of putting the number in your action bar message. That way you don't have to write the same code 5 times. For the head movement thing, check the distance between the location rather than if the two locations are the same.
can u like type it so i understand very well, im currently just new with using skript
 
AppleScript:
command /count:
    trigger:
        send "Counting down from 10!"
        wait 1 second
        loop reversed 10 times:
            send "%loop-number% seconds left"
            wait 1 second
        send "done counting"
And you can check the docs for more info about the distance comparison