Jump to content

Re executing a walk event


Recommended Posts

Posted

Yo I'm trying to use a conditional webWalk event but whenever the condition is met and the webWalk is terminated the script will do what it's supposed to (eat in this case) but then never execute the event again.

walkToSpot.setBreakCondition(new Condition() {
  @Override
  public boolean evaluate() {
  	return getState() == State.EAT;
  }
});
log("Walking to spot");
execute(walkToSpot); //executing the event

That's my code. When it goes back to the walk state it just spams "Walking to spot" in the logger. What am I doing wrong?

Posted (edited)
1 hour ago, d0zza said:

Yo I'm trying to use a conditional webWalk event but whenever the condition is met and the webWalk is terminated the script will do what it's supposed to (eat in this case) but then never execute the event again.


walkToSpot.setBreakCondition(new Condition() {
  @Override
  public boolean evaluate() {
  	return getState() == State.EAT;
  }
});
log("Walking to spot");
execute(walkToSpot); //executing the event

That's my code. When it goes back to the walk state it just spams "Walking to spot" in the logger. What am I doing wrong?

Are you making a new event each time you want to walk?

If not, then you should.

Edited by Explv
  • Like 1

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