- Found in:
- Vanilla
Description
Wiki Description
This function counts the number of linked refs that are in a linked Ref chain (example: A is linked to B is linked to C - this function will return 3)
Documentation Comment
This function counts the number of linked refs that are in a linked Ref chain (ie object is linked to A, A is linked to B, etc. this then counts all the linked refs.)
Aborts early if it detects a loop
Parameters
KeywordapKeyword=NONE
CK Wiki Description
Keyword to check ref link against (see ObjectReference.GetLinkedRef(...).)
- Default:None
intmaxExpectedLinkedRefs=100
CK Wiki Description
Maximum number of expected links. The function stops checking after it finds this many or finishes finding all of them.
- Default:100
Examples
; Count the number of refs in a linked ref chain to us
int numLinkedRefs = countLinkedRefChain(); Count the number of refs in a linked ref chain, following the specified keyword for each one
int numLinkedRefs = countLinkedRefChain(LightKeyword)Auto-Generated Example
Keyword myKeyword__apKeyword
int myInt__maxExpectedLinkedRefs
int returnedValue = myObjectReference__toCallFunctionOn.CountLinkedRefChain(myKeyword__apKeyword, myInt__maxExpectedLinkedRefs)Related Pages
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
