Jump to content

Re executing a walk event


d0zza

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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