LinkCollectionTo - RefCollectionAlias

From Creation Kit
Jump to: navigation, 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

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

Parameters

  • 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

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

Examples

; 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