TheGreatests Posted December 20, 2016 Posted December 20, 2016 Ive tried alot of things so I decided to try just walking the path. here is my set up, exactly like how it was posted in the tutorials however. I am getting a erro private Position[] path = { new Position(3183, 3431, 0), new Position(3177, 3429, 0), new Position(3171, 3426, 0), new Position(3172, 3416, 0), new Position(3171, 3404, 0), new Position(3173, 3395, 0), new Position(3177, 3388, 0), new Position(3179, 3381, 0), new Position(3182, 3375, 0) }; Then using getWalking().walkPath(path); But its wanting me to change it to .walk, and then when I change it to walk. it wants me to do other stupid shit. any help?
Abuse Posted December 20, 2016 Posted December 20, 2016 It's asking for a list. List<Position> path = Arrays.asList( new Position(3183, 3431, 0), new Position(3177, 3429, 0), new Position(3171, 3426, 0), new Position(3172, 3416, 0), new Position(3171, 3404, 0), new Position(3173, 3395, 0), new Position(3177, 3388, 0), new Position(3179, 3381, 0), new Position(3182, 3375, 0) ); 3
Apaec Posted December 20, 2016 Posted December 20, 2016 Ive tried alot of things so I decided to try just walking the path. here is my set up, exactly like how it was posted in the tutorials however. I am getting a erro private Position[] path = { new Position(3183, 3431, 0), new Position(3177, 3429, 0), new Position(3171, 3426, 0), new Position(3172, 3416, 0), new Position(3171, 3404, 0), new Position(3173, 3395, 0), new Position(3177, 3388, 0), new Position(3179, 3381, 0), new Position(3182, 3375, 0) }; Then using getWalking().walkPath(path); But its wanting me to change it to .walk, and then when I change it to walk. it wants me to do other stupid shit. any help? As was mentioned above, you've defined it as an array, which is what the API path walking used to take (hence the outdated tutorials tell you to do it this way). Instead, you need to define it as a list. 1
TheGreatests Posted December 20, 2016 Author Posted December 20, 2016 yup, I got it . Now onto determining how to calculate players around me... lol anyone help me out with that one. Im in the blind with this af!
Abuse Posted December 20, 2016 Posted December 20, 2016 yup, I got it . Now onto determining how to calculate players around me... lol anyone help me out with that one. Im in the blind with this af! for (Player player : getPlayers().getAll()) { if (player.mycondition() == whatIamLookingFor) { //do stuff with player } } 1
TheGreatests Posted December 20, 2016 Author Posted December 20, 2016 for (Player player : getPlayers().getAll()) { if (player.mycondition() == whatIamLookingFor) { //do stuff with player } } Well, tyvm MR.Abuse!
TheGreatests Posted December 21, 2016 Author Posted December 21, 2016 Well what I am looking to do is calculate that if surrounding players is more then 3, to either hop or move to the next rock... int Tomuch = 3; the thing is, I cant do <=, or >= for (Player player : getPlayers().getAll()) { ///////Calculating players around if(player.equals(Tomuch)){ //hop //walktootherrock } } Could I use this?? for (Player player : getPlayers().getAll()) { ///////Calculating players around if(player.getIndex() <=2){ //do something } }