Find methods, along with look methods are the primary way to get in-game objects. They are split up into two types. One type is using the find methods available in the Room object, and the other type is by using RoomPosition methods.
Find methods in the Room object
Find methods of the Room object will return an array of values or an integer error value, depending on the specific method. It is recommended to check the API prior to using them. Links to the method in the API are provided by clicking on the appropriate method below.
[|Room.find()] find method will return an array of objects that meet the specifications passed in the arguments. It can be passed a FIND_* constant, and has and optional filter argument.
[| room.findExitTo()] will return an array of directional exit constants (e.g. FIND_EXIT_TOP) or an integer erro value if there is no path or you pass an invalid argument. This is typically used in conjunction with another find method to get specific RoomPositions matching the returned exit constants.