Jump to content

Break Condtion


Recommended Posts

Posted

Am I not able to use any sort of NPC as a break condition? I've been having a problem getting this to work. Maybe I'm just being a dummy xD

                walkEvent.setBreakCondition(new Condition() {
                    @Override
                    public boolean evaluate() {
                        return mage != null && mage.isVisible();
                    }
                });

 

Posted
15 minutes ago, Juggles said:

How long are you waiting? Break condition hasn't a built in sleep timer of like 10-20 seconds you have to wait to activate. 

Why? I don't know. 

Your condition should return true if the dude is visible. 

REad this thread for More info and ways around it. 

 

Yeah I'm not waiting that long. I'll have to see what I can do to actually have that going for that long.

Posted (edited)
5 minutes ago, Malcolm said:

Yeah I'm not waiting that long. I'll have to see what I can do to actually have that going for that long.

Is the NPC mage already set by the time you reach the condition? In the Boolean function call 

NPC mage = getNpcs().closest(“mage”); 

before returning. That may help... 

Edited by jca

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