mbuzz13 Posted August 24, 2018 Posted August 24, 2018 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?
Chris Posted August 24, 2018 Posted August 24, 2018 https://osbot.org/api/org/osbot/rs07/api/filter/AreaFilter.html 1
Butters Posted August 25, 2018 Posted August 25, 2018 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); }
Explv Posted August 25, 2018 Posted August 25, 2018 (edited) 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, 2018 by Explv