Jump to content

Help with not going to specific area


ugpjosh

Recommended Posts

I have this code:

 

 

"private state getState() {
        if (DANGER_AREA.contains(myPlayer()))
            return state.STEAL_POS;
        Entity stall = objects.closest("Tea Stall");
        if (!inventory.isEmpty())
            return state.DROP;
        if (stall != null)
            return state.STEAL;
        return state.WAIT;
    }"

 

 

But in the second line where it says 'contains', what would I change that to to make it recognize if my player is in that area?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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