EnableLinkChain - ObjectReference

Member of: ObjectReference Script

This function enables all the linked refs, linked in a chain, from this reference.

SyntaxEdit

Function EnableLinkChain(Keyword apKeyword = None)
	ObjectReference CurrentLink = GetLinkedRef(apKeyword)
	While CurrentLink
		CurrentLink.Enable()
		CurrentLink = CurrentLink.GetLinkedRef(apKeyword)
	endWhile
endFunction

ParametersEdit

  • apKeyword: Keyword to check ref link against (see GetLinkedRef.)
    • Default: None

Return ValueEdit

None.

ExamplesEdit

; Enable every ref linked to startRef in a chain
startRef.EnableLinkChain()


; Enable every ref linked to startRef using the special keyword
startRef.EnableLinkChain(SpecialKeyword)

NotesEdit

Do not use this on a link chain that is linked in a loop or it will cause an endless loop.

See AlsoEdit