Skript does not understand the 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.

Aawqq2112

Member
Apr 1, 2021
20
0
1
32
Code:
is not walk on dirt or grass:
   apply slowness 2 to the player for 1 second



23234234.PNG
 
can you try if this works:
Code:
on walk on any block:
    if event-block is not dirt or grass:
        apply slowness 2 to the player for 1 second
 
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:
command /scenario start:
    permission: scenario.start
    trigger:
        set {_bc} to true
        while {_bc} is true:
            loop all players:
                if block under loop-player is dirt block:
                    apply slowness to loop-player for 1 second
                else if block under loop-player is grass block:
                    apply slowness to loop-player for 1 second


command /scenario stop:
    permission: scenario.stop
    trigger:
        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:
on load:
    set {_bc} to true
    while {_bc} is true:
        loop all players:
            if block under loop-player is dirt block:
                apply slowness to loop-player for 1 second
            else if block under loop-player is grass block:
                apply slowness to loop-player for 1 second
 
Last edited:
if you add skQuery to your server, you can use the on any movement event.

Code:
on any movement:
    if block under player is dirt:
        apply slowness to player for 1 second
 
  • Like
Reactions: Mashhhyyy
Status
Not open for further replies.