August 24, 20187 yr I want my player to chop the trees inside the area I specified. How would I make an area check to make sure that my player stays within these boundaries while cutting?
August 25, 20187 yr Area area = new Area(2001. 150. 2005. 160); // left corner X, left corner Y, right corner, X, right corner Y if (area.contains(myPlayer()) { chopStuff(); else { walking.webwalk(area); }
August 25, 20187 yr 36 minutes ago, Butters said: Area area = new Area(2001. 150. 2005. 160); // left corner X, left corner Y, right corner, X, right corner Y if (area.contains(myPlayer()) { chopStuff(); else { walking.webwalk(area); } Player will still interact with trees outside of the Area, and end up walking back and forth being super confuse, unless you filter the objects with an AreaFilter. May want to updoot ur answer to demonstrate. Edited August 25, 20187 yr by Explv
Create an account or sign in to comment