Is There A Script Command To Check The Player's Current Speed?

● ARCHIVED · READ-ONLY
Started by Uzuki 5 posts View original ↗
  1. So what I want to do is make an conditional branch that checks what the player current speed is. Is there an script command or plugin that I can use?
  2. I dont think so, but you know with which Speed the Player starts, so you can keep track of speed changes, just
    use a Variable and change it everytime you change the speed, that helps you to always know which Speed.
  3. @Bex Yeah I would do that, but the problem is that I'm using @procraftynation 's weight plugin and that automatically lowers the movement speed when the player is encumbered which means that I have no control over it when it happens. I was hoping that there a script call that I was overlooking so I could then turn on switches and stuff.
  4. @Uzuki Heya!
    I don't know if the plugins you're using alters something, but, as default, you can check the current movement speed of your player using this script call inside the conditional branch:

    Code:
    $gamePlayer.moveSpeed()
    
    Ex.
    
    $gamePlayer.moveSpeed() > 4
    $gamePlayer.moveSpeed() < 2
    
    $gamePlayer.moveSpeed() >= 4
    $gamePlayer.moveSpeed() <= 5
    
    $gamePlayer.moveSpeed() === 2
  5. @Gamefall Team Thank you! I must have been writing it wrong because it didn't do anything when I tried it earlier, but these actually worked. Thanks again for the help!