Detecting Movements

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

kittkarrkitt

Supporter
Jan 4, 2021
33
0
6
Hi, I need to know if there is any way to detect if the player or entity stops sprinting after it has started sprinting, which is detectable with on player sprint. I also need to know how to detect if the player or entity has its walk speed at a certain speed (if walk speed of player is higher then xx, didn't work for me).



Code:
command /emerald:
    trigger:
        give emerald named "&5Speedy Emerald" with lore "&4Dangerous" to the player

on any movement:
    event-entity is player:
        if event-entity is sprinting:
            player is holding an emerald named "&5Speedy Emerald" with lore "&4Dangerous"
            #apply speed tier 2 to player for 15 seconds
            set the walk speed of event-entity to 4
            message "Emerald Sprint"
            stop
 
Hi, I need to know if there is any way to detect if the player or entity stops sprinting after it has started sprinting, which is detectable with on player sprint. I also need to know how to detect if the player or entity has its walk speed at a certain speed (if walk speed of player is higher then xx, didn't work for me).



Code:
command /emerald:
    trigger:
        give emerald named "&5Speedy Emerald" with lore "&4Dangerous" to the player

on any movement:
    event-entity is player:
        if event-entity is sprinting:
            player is holding an emerald named "&5Speedy Emerald" with lore "&4Dangerous"
            #apply speed tier 2 to player for 15 seconds
            set the walk speed of event-entity to 4
            message "Emerald Sprint"
            stop
what version of minecraft are you using
 
Status
Not open for further replies.