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.

Skript does not understand the event

Discussion in 'Skript' started by Aawqq2112, May 29, 2021.

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

    Aawqq2112 Member

    Joined:
    Apr 1, 2021
    Messages:
    20
    Likes Received:
    0
    Code (Text):
    1. is not walk on dirt or grass:
    2.    apply slowness 2 to the player for 1 second


    23234234.PNG
     
  2. Tymen van Essen

    Joined:
    May 20, 2021
    Messages:
    43
    Likes Received:
    1
    can you try if this works:
    Code (Text):
    1. on walk on any block:
    2.     if event-block is not dirt or grass:
    3.         apply slowness 2 to the player for 1 second
     
  3. Aawqq2112

    Aawqq2112 Member

    Joined:
    Apr 1, 2021
    Messages:
    20
    Likes Received:
    0
    not in work

    upload_2021-6-1_17-17-57.png
     
  4. Mashhhyyy

    Mashhhyyy Member

    Joined:
    Mar 8, 2021
    Messages:
    13
    Likes Received:
    1
    This is the way I would do this without SkQuery, May not be the most efficient but it should work. Simply run the command /scenario start to begin checking and /scenario stop to stop.

    Code (Text):
    1. command /scenario start:
    2.     permission: scenario.start
    3.     trigger:
    4.         set {_bc} to true
    5.         while {_bc} is true:
    6.             loop all players:
    7.                 if block under loop-player is dirt block:
    8.                     apply slowness to loop-player for 1 second
    9.                 else if block under loop-player is grass block:
    10.                     apply slowness to loop-player for 1 second
    11.  
    12.  
    13. command /scenario stop:
    14.     permission: scenario.stop
    15.     trigger:
    16.         set {_bc} to false
    If you'd like it to be constantly checking, use this and restart your server, I warn you though it may cause lag.

    Code (Text):
    1. on load:
    2.     set {_bc} to true
    3.     while {_bc} is true:
    4.         loop all players:
    5.             if block under loop-player is dirt block:
    6.                 apply slowness to loop-player for 1 second
    7.             else if block under loop-player is grass block:
    8.                 apply slowness to loop-player for 1 second
     
    #4 Mashhhyyy, Jun 1, 2021
    Last edited: Jun 1, 2021
  5. oHeckGage

    oHeckGage Active Member

    Joined:
    Mar 24, 2020
    Messages:
    105
    Likes Received:
    4
    if you add skQuery to your server, you can use the on any movement event.

    Code (Text):
    1.  
    2. on any movement:
    3.     if block under player is dirt:
    4.         apply slowness to player for 1 second
    5.  
     
    • Like Like x 1
  6. Minecoll_YT

    Supporter Forums Helper

    Joined:
    Dec 2, 2018
    Messages:
    597
    Likes Received:
    37
    or
    Code (Text):
    1. on step on dirt:
    2.     #do smth
     
Thread Status:
Not open for further replies.

Share This Page

Loading...