AresScripts Posted February 27, 2015 Share Posted February 27, 2015 Has anyone else had problems with this method not doing anything? Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 27, 2015 Share Posted February 27, 2015 Has anyone else had problems with this method not doing anything? Havent tried it, maybe show us the code you are using? I might check it out in a minute. Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 27, 2015 Author Share Posted February 27, 2015 Havent tried it, maybe show us the code you are using? I might check it out in a minute. private void checkCamera() { if (s.myPlayer().getRotation() == northRotation) { if (s.getCamera().getYawAngle() < 360 - 45 && s.getCamera().getYawAngle() > 45) { s.log("turn north"); int number = s.random(360 - 45, 360 + 45); if (number > 360) number -= 360; s.getCamera().moveYaw(number); } } if (s.myPlayer().getRotation() == eastRotation) { if (s.getCamera().getYawAngle() < 45 && s.getCamera().getYawAngle() > 90 + 45) { s.getCamera().moveYaw(s.random(45, 90 + 45)); s.log("turn east"); } } if (s.myPlayer().getRotation() == southRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(90 + 45, 180 + 45)); s.log("turn south"); } } if (s.myPlayer().getRotation() == westRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(180 + 45, 360 - 45)); s.log("turn west"); } } s.getCamera().toTop(); } Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 27, 2015 Share Posted February 27, 2015 private void checkCamera() { if (s.myPlayer().getRotation() == northRotation) { if (s.getCamera().getYawAngle() < 360 - 45 && s.getCamera().getYawAngle() > 45) { s.log("turn north"); int number = s.random(360 - 45, 360 + 45); if (number > 360) number -= 360; s.getCamera().moveYaw(number); } } if (s.myPlayer().getRotation() == eastRotation) { if (s.getCamera().getYawAngle() < 45 && s.getCamera().getYawAngle() > 90 + 45) { s.getCamera().moveYaw(s.random(45, 90 + 45)); s.log("turn east"); } } if (s.myPlayer().getRotation() == southRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(90 + 45, 180 + 45)); s.log("turn south"); } } if (s.myPlayer().getRotation() == westRotation) { if (s.getCamera().getYawAngle() < 90 + 45 && s.getCamera().getYawAngle() > 180 + 45) { s.getCamera().moveYaw(s.random(180 + 45, 360 - 45)); s.log("turn west"); } } s.getCamera().toTop(); } Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda). Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 27, 2015 Author Share Posted February 27, 2015 Just tested strictly the moveYaw method, it works, its slow and jerky and doesnt go to the exact angle, but it works (kinda). Lol k. Not sure what im doing wrong then Its not that important though. Thanks for ur help! Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 27, 2015 Share Posted February 27, 2015 Lol k. Not sure what im doing wrong then Its not that important though. Thanks for ur help! Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 0, 90, 180, 270, or whatever you defined those 4 constants to be. Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 27, 2015 Author Share Posted February 27, 2015 Well there are 360 possible degrees in the circle (obviously) and by the looks of it, your code will only execute on 4 of those degrees. 0, 90, 180, 270, or whatever you defined those 4 constants to be. That has to do with what direction the player is facing. (north, south, east, and west) Quote Link to comment Share on other sites More sharing options...
Mysteryy Posted February 27, 2015 Share Posted February 27, 2015 That has to do with what direction the player is facing. (north, south, east, and west) Oh ok I just reread that. Do your logs execute? Quote Link to comment Share on other sites More sharing options...
AresScripts Posted February 27, 2015 Author Share Posted February 27, 2015 Oh ok I just reread that. Do your logs execute? Yeah. Ill run it again and show u a screenshot Oh ok I just reread that. Do your logs execute? Only the north one and i think its because it logs before it executes the method. Quote Link to comment Share on other sites More sharing options...