CCBlueX Forum

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

    How to make longjump yaw same as my yaw?

    Scripts
    5
    8
    222
    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.
    • WaterFlex
      WaterFlex last edited by

      How to make longjump yaw same as my yaw?

      redmistiscoming FaaatPotato 2 Replies Last reply Reply Quote 1
      • redmistiscoming
        redmistiscoming Banned @WaterFlex last edited by

        @WaterFlex said in How to make longjump yaw same as my yaw?:

        How to make longjump yaw same as my yaw?

        Elaborate.

        1 Reply Last reply Reply Quote 0
        • FaaatPotato
          FaaatPotato @WaterFlex last edited by

          @WaterFlex

          var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
          mc.thePlayer.motionX = longJumpMotion * -Math.sin(playerYaw);
          mc.thePlayer.motionZ = longJumpMotion * Math.cos(playerYaw);
          
          WaterFlex 2 Replies Last reply Reply Quote 0
          • WaterFlex
            WaterFlex @FaaatPotato last edited by

            @FaaatPotato thx

            Plumer Man 1 Reply Last reply Reply Quote 0
            • Plumer Man
              Plumer Man @WaterFlex last edited by

              @WaterFlex np

              1 Reply Last reply Reply Quote 0
              • WaterFlex
                WaterFlex @FaaatPotato last edited by

                @FaaatPotato it didn't work
                what am i doing wrong
                /// api_version=2
                var script = registerScript({
                name: "Longjump2",
                version: "1.0.0",
                authors: ["idk"]
                });

                script.registerModule({
                name: "Longjump2",
                category: "Movement",
                description: "idk."
                }, function (module) {
                module.on("enable", function() {
                var playerYaw = Math.radians(mc.thePlayer.rotationYaw);
                mc.thePlayer.motionX = 0.5 * -Math.sin(playerYaw);
                mc.thePlayer.motionZ = 0.5 * Math.cos(playerYaw);
                });
                });

                WaterFlex 1 Reply Last reply Reply Quote 0
                • WaterFlex
                  WaterFlex @WaterFlex last edited by

                  @WaterFlex ok fixed it

                  WaterFlex Gaming 1 Reply Last reply Reply Quote 0
                  • WaterFlex Gaming
                    WaterFlex Gaming @WaterFlex last edited by

                    @WaterFlex if someone gonna have same issue just put
                    Math.radians = function(degrees) {
                    return degrees * Math.PI / 180;
                    }
                    at start of script

                    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