Jump to content

Need help crossing wilderness ditch with webWalking


Recommended Posts

Posted

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());

 

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

Posted
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

  • Like 1
Posted
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.

 

Posted
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

 

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