LinkCollectionTo - RefCollectionAlias

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: RefCollectionAlias Script

LinkRefs each index of the RefCollectionAlias to the same index of the target RefCollectionAlias using the keyword specified. Can be set to wrap to the top of the target RefCollectionAlias if it runs out of indexes before the colleciton this is called on.

Syntax[edit | edit source]

bool function LinkCollectionTo(RefCollectionAlias LinkedRefCollectionAlias, keyword LinkKeyword = none, bool WrapLinks = false)

Parameters[edit | edit source]

  • LinkedRefCollectionAlias: The ObjectReference to add to this alias
  • LinkKeyword: The Keyword type of LinkedRef to use
    • Default: None
  • WrapLinks: Whether to start back at index 0 of LinkedRefCollectionAlias if it runs out of indexes before the refCollectionAlias this function is called on.
    • Default: False

Return Value[edit | edit source]

Whether all indexes of source RefCollectionAlias successfully linked (always true if wrapLinks is true).

Examples[edit | edit source]

; Give my refCollectionAlias of actors linkRefs of type DMP_Combat_HoldPosition256 to the corresponding indexes
; of CombatTargetCollectionAlias
MyActorCollectionAlias.LinkCollectionTo(CombatTargetCollectionAlias, DMP_Combat_HoldPosition256, wrapLinks = true)

See Also[edit | edit source]