Mod:Creation Kit/UnregisterForDistanceEvents - ScriptObject

Member of: ScriptObject

Unregisters this script from receiving OnDistanceLessThan or OnDistanceGreaterThan events for the two objects.

Only the script that registers for an event will receive it. Other scripts attached to the same form, alias, or magic effect will not receive the event unless they also register for it.

Syntax
Function UnregisterForDistanceEvents(ScriptObject akObj1, ScriptObject akObj2) native

Parameters

 * akObj1: The first object to check distance with. (Must be an ObjectReference or ReferenceAlias)
 * akObj2: The second object to check distance with. (Must be an ObjectReference or ReferenceAlias)

Return Value
None

Examples
UnregisterForDistanceEvents(Earth, Moon)
 * We no longer care about the distance between the earth and moon