d0zza Posted July 4, 2017 Posted July 4, 2017 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?
Explv Posted July 4, 2017 Posted July 4, 2017 (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 July 4, 2017 by Explv 1
d0zza Posted July 4, 2017 Author Posted July 4, 2017 23 minutes ago, Explv said: Are you making a new event each time you want to walk? If not, then you should. Fk i'm silly
Alek Posted July 4, 2017 Posted July 4, 2017 2 hours ago, d0zza said: Fk i'm silly Once events are done they have a finished state, meaning they can't be re-executed. Prior to executing an event, it has a "ready" state. This is why you can't re-execute events. 1