UCC Reference

UI_find_direction

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

Parameter / value Description
param1 The object or location from which we want the direction.
param2 The 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:

Parameter / value Description
Type Interpretation/Format
object The 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 = 0 NORTHEAST = 1 EAST = 2 SOUTHEAST = 3
SOUTH = 4 SOUTHWEST = 5 WEST = 6 NORTHWEST = 7

Related intrinsics

Full intrinsic reference | Reference definitions