Jump to content

Area Checks


Recommended Posts

Posted (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 by Explv

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...