GSC reference › Built-in
ArrayCopy()
Built-in (engine)
Server + client
Utility
Returns a copy of an array
Signature
ArrayCopy(<array1>)
Parameters
| Name | Required? | Details |
|---|---|---|
| array1 | Required | array to operate on |
Real uses in BO3's scripts
Called 82 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_pers_upgrades_functions.gsc, line 722
self.a_saved_perks = arraycopy(self.perks_active); - scripts/zm/_zm_utility.gsc, line 1792
players = arraycopy(level.players); - scripts/zm/bgbs/_zm_bgb_disorderly_combat.gsc, line 189
self.var_cc73883d = arraycopy(self.aat); - scripts/zm/bgbs/_zm_bgb_eye_candy.gsc, line 122
self.var_29cebda6 = arraycopy(level.var_29cebda6); - scripts/zm/bgbs/_zm_bgb_idle_eyes.gsc, line 83
var_7092e170 = arraycopy(level.activeplayers);
Related built-ins
- array()Create an array
- Assert()Assert that the given statement is correct.
- GetDvarInt()Gets the value of a dvar.
- IsArray()Checks whether this entity/variable is an array
- GetDvarString()Gets the value of a dvar.
- ArrayRemoveValue()Remove a value from an array (may affect multiple indexes)
- GetDvarFloat()Gets the value of a dvar.
- IsSubStr()Returns true/false if <substring> is a substring of <string>.
- GetArrayKeys()Returns an array consisting of the keys of the input array.
- ArrayCombine()Combine two arrays into and returns one new array
- IsInArray()Searches an array to determine if a given value is present in that array
- StrTok()Tokenizes <string> by the delimiters <delim>.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).