Remove - Array

From the Fallout4 CreationKit Wiki
Revision as of 17:45, 11 July 2014 by 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Member of: All arrays

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

Syntax

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

Parameters

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

Return Value

None

Examples

; 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