[DEV SERVER] Loading description...
Caveats
CK Wiki - Notes
- The form that this function is called on doesn't have to be either object. In this way you could have a quest that gets distance events from between the player and a quest objective.
- The two object parameters are interchangeable. If you re-register for a distance greater than event using the same two objects in a different order, your current registration will simply be updated with the new distance.
- A script can only be registered for one distance greater than event per object pair. If you register for another one, the distance will be updated. You can, however, register for a distance less than event between the same pair without affecting this registration.
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
Parameters
ScriptObjectakObj1
CK Wiki Description
The first object to check distance with. (Must be an ObjectReference or ReferenceAlias)
ScriptObjectakObj2
CK Wiki Description
The second object to check distance with. (Must be an ObjectReference or ReferenceAlias)
floatafDistance
CK Wiki Description
How far apart the objects must be before the event is sent
Examples
; Register for an event when the father is farther than 1000 game units from the child or more
RegisterForDistanceGreaterThanEvent(Child, Father, 1000.0)Auto-Generated Example
ScriptObject myScriptObject__akObj1
ScriptObject myScriptObject__akObj2
float myFloat__afDistance
myScriptObject__toCallFunctionOn.RegisterForDistanceGreaterThanEvent(myScriptObject__akObj1, myScriptObject__akObj2, myFloat__afDistance)Related Pages
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
