LinkCollectionTo - RefCollectionAlias

Revision as of 11:52, 3 December 2015 by imported>Plplecuyer (→‎Return Value)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.

SyntaxEdit

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

ParametersEdit

  • 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 ValueEdit

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

ExamplesEdit

; 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 AlsoEdit