GetNthLinkedRef - ObjectReference
Revision as of 16:52, 21 October 2011 by imported>Jlundin
Member of: ObjectReference Script
Gets the Nth linked ref from this object.
Syntax[edit | edit source]
ObjectReference Function GetNthLinkedRef(int aiLinkedRef) native
Parameters[edit | edit source]
- aiLinkedRef: The linked ref to get. 0 will return this object, 1 will return the same as GetLinkedRef with no keyword parameter, 2 will return essentially "GetLinkedRef().GetLinkedRef()", and so on.
Return Value[edit | edit source]
The Nth linked ref from this object.
Examples[edit | edit source]
; Assume Item3 is the linked ref of Item2, which is the linked ref of Item1
ObjectReference linkedRef1 = Item1.GetNthLinkedRef(0) ; Returns Item1
ObjectReference linkedRef2 = Item1.GetNthLinkedRef(1) ; Returns Item2
ObjectReference linkedRef3 = Item1.GetNthLinkedRef(2) ; Returns Item3