Difference between revisions of "GetActionRef"
→Notes: Most common block people try
imported>Skyranger-1 |
imported>Haama (→Notes: Most common block people try) |
||
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 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. | ||
** 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 ) | ||
if ( IsActionRef player ) ; these two expressions are equivalent</pre> | if ( IsActionRef player ) ; these two expressions are equivalent</pre> | ||
==See Also== | ==See Also== | ||
[[IsActionRef]] | [[IsActionRef]] |