Difference between revisions of "GetActionRef"

811 bytes added ,  22:41, 7 September 2008
Reciprocating links because it makes sense.
 
imported>Antares
(Reciprocating links because it makes sense.)
 
(16 intermediate revisions by 8 users not shown)
Line 3: Line 3:
    
    


Returns the reference currently activating the scripted object. '''Valid only when the object is being activated.''' It will only return a value during the frame after the object has been activated. This means it is generally only useful inside an [[OnActivate]] block.
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]] 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.
 
==Notes==
* This function is only useful inside an OnActivate 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]]:
<pre>if ( GetActionRef == player )
if ( IsActionRef player ) ; these two expressions are equivalent</pre>
 
==See Also==
==See Also==
[[IsActionRef]]
[[IsActionRef]]<BR>
[[OnTrigger]]


[[Category: Functions]]
[[Category: Functions]]
[[Category: Reference Variable Functions]]
[[Category: Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category: Miscellaneous Functions]]
[[Category: Miscellaneous Functions (CS 1.0)]]
[[Category: Record Variable Functions]]
[[Category: Record Variable Functions (CS 1.0)]]
 
<!-- Begin Search Terms
Get
Action
Ref
End Search Terms -->
Anonymous user