Alakazizam Posted January 28, 2023 Posted January 28, 2023 I'm probably not doing this right but I'm trying to make a webWalking event that breaks when the caution message appears when crossing the wilderness ditch. As of now it stops at the ditch for a while and then attempts to cross again some time after. This is what I'm working with at the moment. My function. void WalkToWithBreak(Position MyPosition, boolean BreakCondition) { WebWalkEvent MyEvent = new WebWalkEvent(MyPosition); MyEvent.setBreakCondition(new Condition() { @Override public boolean evaluate() { return BreakCondition; } }); execute(MyEvent); } Calling my function. WalkToWithBreak(AssessmentZone.getRandomPosition(), getWidgets().get(475, 11, 1) != null && getWidgets().get(475, 11, 1).isVisible());
Gunman Posted January 28, 2023 Posted January 28, 2023 @Alakazizam Try high break priority instead setHighBreakPriority(boolean highPriority) Allows for break conditions to be checked during waits, default value is false.
Alakazizam Posted January 28, 2023 Author Posted January 28, 2023 21 minutes ago, Gunman said: @Alakazizam Try high break priority instead setHighBreakPriority(boolean highPriority) Allows for break conditions to be checked during waits, default value is false. I've tried void WalkToWithBreak(Position MyPosition, boolean BreakCondition) { WebWalkEvent MyEvent = new WebWalkEvent(MyPosition); MyEvent.setHighBreakPriority(BreakCondition); execute(MyEvent); } And that did not work.
Gunman Posted January 28, 2023 Posted January 28, 2023 6 minutes ago, Alakazizam said: I've tried void WalkToWithBreak(Position MyPosition, boolean BreakCondition) { WebWalkEvent MyEvent = new WebWalkEvent(MyPosition); MyEvent.setHighBreakPriority(BreakCondition); execute(MyEvent); } And that did not work. Oh you're using a boolean, it's value is not being rechecked. You're basically just sending false the whole time. Use something like BooleanSupplier 1
Alakazizam Posted January 28, 2023 Author Posted January 28, 2023 50 minutes ago, Gunman said: Oh you're using a boolean, it's value is not being rechecked. You're basically just sending false the whole time. Use something like BooleanSupplier Yeah, I couldn't wrap my head around that so I made a work around lol. I have a LOT of experience with blueprint coding in Unreal Engine, but when it comes to actually WRITING code, I get lost. I just made a massive area that covers the wilderness. If I'm not in the area I run to a designated area by the ditch and interact with it and the warning widget and then carry on going where I was going lol.
Gunman Posted January 28, 2023 Posted January 28, 2023 1 hour ago, Alakazizam said: Yeah, I couldn't wrap my head around that so I made a work around lol. I have a LOT of experience with blueprint coding in Unreal Engine, but when it comes to actually WRITING code, I get lost. I just made a massive area that covers the wilderness. If I'm not in the area I run to a designated area by the ditch and interact with it and the warning widget and then carry on going where I was going lol. It's fairly simple