Difference between revisions of "AddArray - RefCollectionAlias"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
(Created page with "Category:Scripting Category:Papyrus '''Member of:''' RefCollectionAlias Script Adds the contents of the array to this collection. == Syntax == <source lang="papyrus...")
 
imported>Scrivener07
m (→‎Notes: None references can't be added to collections.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
'''Member of:''' [[RefCollectionAlias Script]]
'''Member of:''' [[RefCollectionAlias Script]]


Line 21: Line 19:
Ghosts.AddArray(EvenMoreGhosts)
Ghosts.AddArray(EvenMoreGhosts)
</source>
</source>
== Notes ==
* A RefCollectionAlias will automatically shrink and expand its size when items are added or removed. The collection's count can be measured with the [[GetCount - RefCollectionAlias|GetCount]] function.
* Reference Aliases inside arrays will not be added to a collection if they are none. An error will be printed to the log if an element is none.


== See Also ==
== See Also ==
*[[RefCollectionAlias Script]]
*[[RefCollectionAlias Script]]
[[Category:Scripting]]
[[Category:Papyrus]]

Latest revision as of 10:19, 5 March 2021

Member of: RefCollectionAlias Script

Adds the contents of the array to this collection.

Syntax[edit | edit source]

Function AddArray(ObjectReference[] refArrayToAdd)

Parameters[edit | edit source]

  • refArrayToAdd: The array whose contents should be added

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Add the array to the collection
Ghosts.AddArray(EvenMoreGhosts)

Notes[edit | edit source]

  • A RefCollectionAlias will automatically shrink and expand its size when items are added or removed. The collection's count can be measured with the GetCount function.
  • Reference Aliases inside arrays will not be added to a collection if they are none. An error will be printed to the log if an element is none.

See Also[edit | edit source]