Ar Erase

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(numRemoved:short) ar_Erase target:array index:arrayIndex 
(numRemoved:short) ar_Erase target:array range:slice

Erases elements from an array. You may provide a single element, in which case only that element will be erased and only if it is present. Or, you may provide a range in slice notation. Any elements greater than or equal to the lower bound and less than or equal to the upper bound of the range will be erased. If the array is of type Array, elements above the erased elements will be shifted down. Returns the number of elements removed.