Jump to content

2+ doors opening


plekstw
 Share

Recommended Posts

Right now you always get the closest door (open or closed), so if you open one the next time closest will still return the same door. Instead you could use a filter: objects.closest("Door", o -> o.hasAction("Open"))    << this will always give you a closed door.

You could do something like

 

if knight is not null {
 if doorHandler.handleNextObstacle(knight) return // door handled, loop after
 else do pickpocket stuff
}

Doorhandler API

Edited by Flamezzz
  • Like 1
Link to comment
Share on other sites

Right now you always get the closest door (open or closed), so if you open one the next time closest will still return the same door. Instead you could use a filter: objects.closest("Door", o -> o.hasAction("Open"))    << this will always give you a closed door.

You could do something like

 

if knight is not null {

 if doorHandler.handleNextObstacle(knight) return // door handled, loop after

 else do pickpocket stuff

}

Doorhandler API

Thanks man! Worked wonderfull :D

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.

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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...