Solved on any move - cancel event

  • 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!

Status
Not open for further replies.

Barbarx

Active Member
Feb 25, 2017
71
5
0
71
Hello here. i wanna create delay than you will be teleported by command but i cant do one thing.

This is only example:
code_language.skript:
on any move:
    cancel event
cancels cursor movement so i cant rotate etc. and i wanna do this when you will use command "Spawn" you must stay 2 seconds, but i have problems with cursor movement i wanna only on movement what wont affect cursor movement. is something like that?

Sorry for my really bad english.
Thanks.
 
Here you go:
code_language.skript:
set {_location} to location of player
loop 10 times:
    set {_check} to location of player
    if {_check} isn't {_location}:
        teleport player to {_location}
    wait 2 ticks
 
Here you go:
code_language.skript:
set {_location} to location of player
loop 10 times:
    set {_check} to location of player
    if {_check} isn't {_location}:
        teleport player to {_location}
    wait 2 ticks
Oooh nice.
[doublepost=1493499830,1493499585][/doublepost]
Here you go:
code_language.skript:
set {_location} to location of player
loop 10 times:
    set {_check} to location of player
    if {_check} isn't {_location}:
        teleport player to {_location}
    wait 2 ticks
code_language.skript:
command /spawn:
    trigger:
        if world is "survival" or "survival_nether" or "survival_the_end":
            set {_location} to location of player
            loop 5 times:
                set {_check} to location of player
                if {_check} = {_location}:
                    send player title "&6Teleportuju za % 6 - loop-number%" with subtitle "&eNehybej se prosim te" for 1 seconds
                    wait 1 second
                else:
                    send player title "&cTeleportovani zruseno" for 1 seconds
                    stop
            message "&7Teleportuju te na spawn" to player
            set yaw of {survival} to 0
            set pitch of {survival} to 0
            teleport the player to {survival}
            stop
My full code. ty for help.
[doublepost=1493500500][/doublepost]
Here you go:
code_language.skript:
set {_location} to location of player
loop 10 times:
    set {_check} to location of player
    if {_check} isn't {_location}:
        teleport player to {_location}
    wait 2 ticks
but i cant still move with mouse :emoji_grinning:
 
Yeah. but i wanna do when they move they will cancel teleporting. but i wanna allow moving with mouse but only on movement disable this teleporting.
[doublepost=1493501074,1493500670][/doublepost]
You should move it if you don't change your location.
I ll think when i will set only x location z location and y location it will works. What do you think?
 
code_language.skript:
set {_location} to location of player
set {_x} to x-coords of player
set {_z} to z-coords of player
loop 10 times:
    set {_x-check} to x-coords of player
    set {_z-check} to z-coords of player
    if {_x-check} isn't {_x}:
        teleport player to {_location}
    if {_z-check} isn't {_z}:
        teleport player to {_location}
    wait 2 ticks
 
Last edited by a moderator:
  • Like
Reactions: Barbarx
code_language.skript:
set {_location} to location of player
set {_x} to x-coords of player
set {_z} to z-coords of player
loop 10 times:
    set {_x-check} to x-coords of player
    set {_z-check} to x-coords of player
    if {_x-check} isn't {_x}:
        teleport player to {_location}
    if {_z-check} isn't {_z}:
        teleport player to {_location}
    wait 2 ticks

shouldn't this: set {_z-check} to x-coords of player

Be this: set {_z-check} to z-coords of player
 
Status
Not open for further replies.