Seven Towers: UCC Reference

USECODE INTRINSICS

object UI_find_object(object cont, int shape, int qual, int frame)
object cont->find_object(int shape, int qual, int frame)
object UI_find_object(int cont, int shape, int qual, int frame)
object UI_find_object(int cont[3], int shape, int qual, int frame)

Finds the first object matching the search criteria.

Parameters

contThe object or location to be searched. Can be a container or NPC, a (x, y, z) location, PARTY = -357 to search the whole party or FIND_ON_SCREEN = -359 to search a square region around the screen location with size given by the screen's height.
shapeThe shape we are looking for.
qualThe quality that is being sought. Can be QUALITY_ANY = -359 to match any quality.
frameWhat frame is desired. Can be FRAME_ANY = -359 to match any frame.
IMPORTANT NOTES
When 'cont' is a position, the search is made in a 1-tile-wide region centered on the given position.
Also, if the search is not being done in a container or NPC, 'shape' can be SHAPE_ANY = -359 to match any shape.

Return

An object reference to the first found object, or zero if no objects match the given criteria.

Related intrinsics

See also