1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Help

Discussion in 'Skript' started by Ventura11, Apr 21, 2020.

Thread Status:
Not open for further replies.
  1. Ventura11

    Ventura11 Member

    Joined:
    Feb 6, 2019
    Messages:
    14
    Likes Received:
    0
    command /speed [<text>]:
    trigger:
    set the arg-1's walk speed to 0.2

    Does not work.
    Can you help me?
     
    #1 Ventura11, Apr 21, 2020
    Last edited: Apr 21, 2020
  2. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    yes, im gonna fix ur code but next time please put code in codeblocks that makes code easy to read
    --- Double Post Merged, Apr 21, 2020, Original Post Date: Apr 21, 2020 ---
    Code (Text):
    1. command /321 <player>:
    2.     trigger:
    3.         execute console command "speed walk 0.2 %arg-1%"
    You need essentials plugin to make it work, Skript's set walk does not work with values lower than 1
     
    • Agree Agree x 1
  3. Ventura11

    Ventura11 Member

    Joined:
    Feb 6, 2019
    Messages:
    14
    Likes Received:
    0
  4. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    WTF why use console commands???

    The problem is that he tryed to set the speed of a text instead of a player...


    Code (Text):
    1. command /speed [<player>]:
    2.     trigger:
    3.         set the arg-1's walk speed to 0.2
     
    • Agree Agree x 1
  5. PanHack

    PanHack Active Member

    Joined:
    Dec 18, 2019
    Messages:
    143
    Likes Received:
    8
    it's glitchy in skript i tried that and it will set ur speed to 1
     
  6. Lego_freak1999

    Lego_freak1999 Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    664
    Likes Received:
    45
    Uhhh let me see
    --- Double Post Merged, Apr 23, 2020, Original Post Date: Apr 23, 2020 ---
    Its not glitchy. The default walk speed is 0.2 .

    The speed range in spigot is from -1 to 1 with values below 0 reverses ur direction. (Didn’t test this but thats what spigot says).

    Essentials modifys the input of the user. If u want to use the Skript method u would have to modify it too.

    Note!: default walk speed is 0.2 but fly speed is 0.1 .

    Something like:

    Wants = 0(no speed) 1(default speed) 5(max speed)

    Actualy = 0(no speed) 0.2(default speed) 1(max speed)

    Realspeed = input * 0,2

    Sources:

    https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#setWalkSpeed-float-

    https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/expressions/ExprSpeed.java

    https://github.com/EssentialsX/Essentials/blob/849efa9756495a34260d57ff1d81df1283e5f5e7/Essentials/src/com/earth2me/essentials/commands/Commandspeed.java
     
Thread Status:
Not open for further replies.

Share This Page

Loading...