Moving/Walking Condition

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

Hexivoid

Member
Oct 22, 2017
35
7
8
Am I using TuSKe's move condition incorrectly? I'd appreciate if someone could help me with this error!

Error: There's no loop that matches 'loop-player is not moving' (Sprint.sk, line 6: if loop-player is not moving:')


code_language.skript:
every 3 seconds in "World":
    loop players:
        if loop-player is sprinting:
            set {_hunger} to loop-player's food level
            set loop-player's food level to {_hunger} - 1
        else if loop-player is not moving:
            set {_hunger} to loop-player's food level
            set loop-player's food level to {_hunger} + 2
[doublepost=1518815178,1518812520][/doublepost]
Am I using TuSKe's move condition incorrectly? I'd appreciate if someone could help me with this error!

Error: There's no loop that matches 'loop-player is not moving' (Sprint.sk, line 6: if loop-player is not moving:')


code_language.skript:
every 3 seconds in "World":
    loop players:
        if loop-player is sprinting:
            set {_hunger} to loop-player's food level
            set loop-player's food level to {_hunger} - 1
        else if loop-player is not moving:
            set {_hunger} to loop-player's food level
            set loop-player's food level to {_hunger} + 2

Using the last builds of Bensku's fork of Skript and TuSKe
 
I've never tried TuSKe but what if you just do like
Code:
else:
    if loop-player is not moving:
        set {_hunger} to loop-player's food level
        set loop-player's food level to {_hunger} + 2
idk lol
 
I've never tried TuSKe but what if you just do like
Code:
else:
    if loop-player is not moving:
        set {_hunger} to loop-player's food level
        set loop-player's food level to {_hunger} + 2
idk lol
Didn't work :emoji_frowning: Guess I'll go ask the developer soon!
 
Didn't work :emoji_frowning: Guess I'll go ask the developer soon!
This condition has been removed since it was laggy; you could try something like the following though:
code_language.skript:
every 3 seconds:

  loop all players:
    
    if distance between {last-location::%loop-player%} and loop-player's location is 0:
      set loop-player's food level to loop-player's food level + 2
    set {last-location::%loop-player%} to loop-player's location
The sprinting check is kinda useless as vanilla Minecraft does that at some degree, you can add it if you want anyways.
 
This condition has been removed since it was laggy; you could try something like the following though:
code_language.skript:
every 3 seconds:

  loop all players:
   
    if distance between {last-location::%loop-player%} and loop-player's location is 0:
      set loop-player's food level to loop-player's food level + 2
    set {last-location::%loop-player%} to loop-player's location
The sprinting check is kinda useless as vanilla Minecraft does that at some degree, you can add it if you want anyways.

It worked, thanks! (The sprint check served a different purpose by the way, and someone should really remove that condition from the docs!)
 
Status
Not open for further replies.