Jump to content

Break Condtion


Malcolm

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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