Jump to content

RS2Object.interact() returns false


Recommended Posts

Posted (edited)

 

I updated my run() method in a previous post. Here it is again. I am getting a new RS2Object

TimerTask task = new TimerTask() {
	@Override
	public void run() {
		int x = rock.getX();
		int y = rock.getY();
		List<RS2Object> objects = getObjects().get(x, y);
		for(RS2Object obj : objects) {
			if(obj.getName().equals("Rocks")) {
				log("get's here");
				rockMap.put("rock", obj);
				break;
			}
		}
		rockMap.put("mineable", true);
	}
};

 

Is that "Get's here" being logged to the console?

Have you been able to debug the problem at hand? (eg. is the problem related to the Rock instances still, or is the canMine boolean inconsistent?)

 

EDIT:

Also be aware that if "interacted" is false (eg. the interaction misclicked or whatever, and you ended up not mining the rock) you still set "canMine" to false. Since you're not mining, this variable will now be permanently false.

 

Edited by FrostBug

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...