Difference between revisions of "Remove - Array"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
(Created page with "Category:Scripting Category:Papyrus '''Member of:''' All arrays Removes an item or group of items from the array at the specified position, shrinking it to fit. == Synt...")
 
imported>Scrivener07
(Undo revision 11769 by Rasikko (talk) (Works as intended after all))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
'''Member of:''' [[:Category:Arrays| All Arrays]]
[[Category:Papyrus]]
'''Member of:''' All arrays


Removes an item or group of items from the array at the specified position, shrinking it to fit.
Removes an item or group of items from the array at the specified position, shrinking it to fit.
Line 38: Line 36:
*[[RemoveLast - Array]]
*[[RemoveLast - Array]]
*[[Clear - Array]]
*[[Clear - Array]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Arrays]]

Latest revision as of 09:32, 1 September 2021

Member of: All Arrays

Removes an item or group of items from the array at the specified position, shrinking it to fit.

Syntax[edit | edit source]

Function Remove(int aiLocation, int aiCount = 1) native

Parameters[edit | edit source]

  • aiLocation: The location of the item to remove
  • aiCount: The number of items to remove
    • Default: 1

Return Value[edit | edit source]

None

Examples[edit | edit source]

; Remove item 0 from the array
MyStringArray.Remove(0)

; In this case, ["Hello", "world"] would become ["world"]


; Remove 2 items starting at position 1 in the array
MyIntArray.Remove(1, 2)

; In this case, [1, 2, 3, 4, 5] would become [1, 4, 5]

See Also[edit | edit source]