Difference between revisions of "GetActionRef"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Haama
(→‎Notes: Most common block people try)
imported>Antares
(Reciprocating links because it makes sense.)
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:


==Notes==
==Notes==
* This function is only useful inside some block types.  It is known to work in  [[OnActivate]] and [[OnTrigger]] blocks.  There are also reports of it working in [[OnHit]] blocks, which implies it might work in some other block types as well.
* This function is only useful inside an OnActivate or OnTrigger block.
** It does ''not'' work in an [[onEquip]] 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]]:
* 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 )
<pre>if ( GetActionRef == player )
Line 13: Line 12:


==See Also==
==See Also==
[[IsActionRef]]
[[IsActionRef]]<BR>
[[OnTrigger]]


[[Category: Functions]]
[[Category: Functions]]
Line 22: Line 22:
[[Category: Record Variable Functions]]
[[Category: Record Variable Functions]]
[[Category: Record Variable Functions (CS 1.0)]]
[[Category: Record Variable Functions (CS 1.0)]]
<!-- Begin Search Terms
Get
Action
Ref
End Search Terms -->

Latest revision as of 21:41, 7 September 2008

Syntax:

set refVar to GetActionRef 
 

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[edit | edit source]

  • 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:
if ( GetActionRef == player )
if ( IsActionRef player ) ; these two expressions are equivalent

See Also[edit | edit source]

IsActionRef
OnTrigger