CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Solved check motion

    ScriptAPI
    2
    3
    73
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Zastix
      Zastix last edited by Zastix

      can you check the motion of the player in a if statement

      what i have so far

       module.on("always", function() {
              if(player.hurtTime && check motion here){
              }
          });
      
      ? 1 Reply Last reply Reply Quote 0
      • ?
        A Former User @Zastix last edited by

        @zastix (you can only check one axis at a time)
        if you it to be the same (probably wont happen)

        if(mc.thePlayer.motionX == 1)
        

        or if you want it to be bigger or smaller just replace "==" with "<" or ">"
        or you can get the speed of player with "MovementUtils.getSpeed()"

        btw you can't really check with "player.hurtTime", if you want to detect when a player takes damage try

        mc.thePlayer.hurtTime >= 8
        

        Also, this won't work:

        module.on("always"
        

        try

         module.on("update"
        
        Zastix 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @Zastix last edited by

          @zastix (you can only check one axis at a time)
          if you it to be the same (probably wont happen)

          if(mc.thePlayer.motionX == 1)
          

          or if you want it to be bigger or smaller just replace "==" with "<" or ">"
          or you can get the speed of player with "MovementUtils.getSpeed()"

          btw you can't really check with "player.hurtTime", if you want to detect when a player takes damage try

          mc.thePlayer.hurtTime >= 8
          

          Also, this won't work:

          module.on("always"
          

          try

           module.on("update"
          
          Zastix 1 Reply Last reply Reply Quote 0
          • Zastix
            Zastix @Guest last edited by

            @britishbiscuit Thanks for the tips and answering the question.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            About
            • Terms of Service
            • Privacy Policy
            • Status
            • Contact Us
            Downloads
            • Releases
            • Source code
            • License
            Docs
            • Tutorials
            • CustomHUD
            • AutoSettings
            • ScriptAPI
            Community
            • Forum
            • Guilded
            • YouTube
            • Twitter
            • D.Tube