GetActionRef

From GECK
(Redirected from GetAR)
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

Returns the reference currently interacting with the scripted object. It will only return a value during the frame after the object has been interacted with. This means it is generally only useful inside an OnActivate, OnTriggerEnter, OnTriggerLeave or OnTrigger block. If more than one object is interacting with the object (for instance, several objects colliding with the same trigger zone), only the most recently interacting object will be returned by this function.

Syntax

[help]
(ActionRef:ref) Activator.GetActionRef 

Or:

(ActionRef:ref) Activator.GetAR

Example

set refVar to GetActionRef 

Notes

  • This function is only useful inside an OnActivate, OnTriggerEnter, OnTriggerLeave, or OnTrigger block.
  • Unlike IsActionRef, which checks for a specific reference, this function returns a reference. However, it can be used to imitate the behavior of IsActionRef:
if ( GetActionRef == player )
if ( IsActionRef player ) ; these two expressions are equivalent

See Also