Jump to content

2+ doors opening


Recommended Posts

Posted (edited)

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
Posted

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

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