Seven Towers: UCC Reference

USECODE INTRINSICS

object UI_find_nearest(object obj, int shape, int dist)
object obj->find_nearest(int shape, int dist)

Searches the area around a given object looking for other objects of a specified type.

Parameters

objThe object around which the search will happen.
shapeThe shape we are looking for. Can be SHAPE_ANY = -359 to match any shape.
distThe maximum distance from 'obj' that will be considered in the search.

Return

An object reference to the nearest object found given the search criteria. You cannot find eggs, barges, invisible or transparent objects with this intrinsic.

Related intrinsics

See also