Mod:Creation Kit/RegisterForDistanceLessThanEvent - ScriptObject

Member of: ScriptObject

Registers this script to receive a single OnDistanceLessThan event when two objects are closer than the specified distance apart. If the objects are already that close, the event will be sent immediately.

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.

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)
 * afDistance: How close the objects must be before the event is sent

Return Value
None