1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved Repeating something while a state is active

Discussion in 'Development' started by Melonenbubi, May 22, 2020.

  1. Melonenbubi

    Melonenbubi Spider

    Messages:
    13
    Hello,

    I want to repeat an action, which should be executed once every tick when a player sneaks. The onPlayerSneakToggle-Event only triggers when a player changes between "Sneak" and "noSneak". Is this possible?
     
  2. Levi

    Levi Skeleton

    Messages:
    955
    GitHub:
    captainleviftw
    yes it’s possible
     
  3. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    Run a task when the player sneaks and in your task check in the player is still sneaking, if not cancel the task
     
    Melonenbubi likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.