Talk:GetNthLinkedRef - ObjectReference

From the CreationKit Wiki
Jump to navigation Jump to search

This caused a bit of confusion for me so I did a bit of slow testing. Putting this here in case others also don't understand how this works.
GetNthLinkedRef(0) returns what I will call the "Master Object". Or the very first object you use to link another object from.
GetNthLinkedRef(1) returns the object linked to the "Master Object" (same as GetLinkedRef).
GetNthLinkedRef(2) returns the object linked to GetNthLinkedRef(1)
GetNthLinkedRef(3) returns GetNthLinkedRef(2) and so on.

A somewhat visual example.. Master Object(0) -> 1 > 2 > 3 > 4 > 5 ... Lisselli (talk) 2017-02-21T05:07:23 (EST)