Seven Towers: UCC Reference

USECODE INTRINSICS

int UI_find_direction(object param1, object param2)
int param1->find_direction(object param2)
int UI_find_direction(object param1, int param2[3])
int param1->find_direction(int param2[3])
int UI_find_direction(object param1, mixed param2[4])
int param1->find_direction(mixed param2[4])
int UI_find_direction(int param1[3], object param2)
int UI_find_direction(int param1[3], int param2[3])
int UI_find_direction(int param1[3], mixed param2[4])
int UI_find_direction(mixed param1[4], object param2)
int UI_find_direction(mixed param1[4], int param2[3])
int UI_find_direction(mixed param1[4], mixed param2[4])

Get the direction from one location or object to another.

This intrinsic is aliased under the name 'direction_from'; they are both equivalent in Exult.

Parameters

param1The object or location from which we want the direction.
param2The object or location to which we want the direction.

Both parameters can be objects, arrays with 3 components or arrays with 4 components. Depending on what they are, Exult will treat them differently and expect them to conform to a certain format; specifically:

TypeInterpretation/Format
objectThe parameter is an object or NPC.
int [3]The parameter is a (x, y, z) position, such as the return of a UI_get_object_position intrinsic call.
mixed [4]The parameter is of the form (object, x, y, z), such as the return of a call to UI_click_on_item intrinsic.

Return

The 8-cardinal-point direction of an arrow starting in the first parameter and pointing to the second parameter. It can be one of the following values:

NORTH = 0NORTHEAST = 1EAST = 2SOUTHEAST = 3SOUTH = 4
SOUTHWEST = 5WEST = 6NORTHWEST = 7

Related intrinsics

See also