GaetanoH Posted April 20, 2016 Posted April 20, 2016 (edited) Could it be that the Area you are checking is too small and you may use 4-5 as the argument? Edited April 20, 2016 by GaetanoH
TFW Posted April 20, 2016 Author Posted April 20, 2016 Could it be that the Area you are checking is too small and you may use 4-5 as the argument? Hmm I'll give it another go with a int of 5. Thanks for some wisdom
GaetanoH Posted April 20, 2016 Posted April 20, 2016 I think you're just overseeing something, I do not get what you're doing in the if-statement
Explv Posted April 20, 2016 Posted April 20, 2016 (edited) I am having some trouble here. It seems that npc.getArea(int).contains(myPosition()) is returning false on me? Anytime the character is in the area of the (filtered NPC OR the interacting) and in melee range -> walk somewhere random Why don't you just do: if(npc.getPosition().distance(myPosition()) <= 3) // if npc is less than or equal to 3 tiles away Edited April 20, 2016 by Explv
TFW Posted April 20, 2016 Author Posted April 20, 2016 Why don't you just do: if(npc.getPosition().distance(myPosition()) <= 3) // if npc is less than or equal to 3 tiles away It's essentially same thing kind of. I just don't want to be in the NPC area everytime I go to attack
TFW Posted April 20, 2016 Author Posted April 20, 2016 Why don't you just do: if(npc.getPosition().distance(myPosition()) <= 3) // if npc is less than or equal to 3 tiles away I ended up fixing it