Difference between revisions of "GetActionRef"

4 bytes removed ,  12:31, 3 December 2007
no edit summary
imported>Nellis
(Clarification)
imported>Nellis
Line 5: Line 5:
Returns the reference currently interacting with the scripted object. '''Valid only when the object is being activated or triggered.''' 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.
Returns the reference currently interacting with the scripted object. '''Valid only when the object is being activated or triggered.''' 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.


''GetActionRef puts the current action ref into a ref variable. IsActionRef checks to see if the given ref is our action ref. The action ref is whatever ref is responsible for the most recent script action (ie: in an OnActivate block, its the ref that activated the scripted object, in an OnTriggerEnter, its the ref that entered the trigger, etc).''
GetActionRef puts the current action ref into a ref variable. IsActionRef checks to see if the given ref is our action ref. The action ref is whatever ref is responsible for the most recent script action (ie: in an OnActivate block, its the ref that activated the scripted object, in an OnTriggerEnter, its the ref that entered the trigger, etc).


;this is GOOD. stores our action ref in a ref variable for later use
;this is GOOD. stores our action ref in a ref variable for later use
Anonymous user