December 12, 201510 yr hey guys i have got a problem, i want to open doors to get to an npc but my script opens only 1 door please help http://pastebin.com/JzkNzuaV
December 12, 201510 yr 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 December 12, 201510 yr by Flamezzz
December 13, 201510 yr Author 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
Create an account or sign in to comment