Signature
array(<args>)
Parameters
| Name | Required? | Details |
|---|---|---|
| args | Required | one or more args to add to the array |
Real uses in BO3's scripts
Called 2,723 times in the decompiled scripts. A few, zombies first:
- scripts/codescripts/struct.csc, line 165
level.struct = array(level.struct); - scripts/codescripts/struct.gsc, line 166
level.struct = array(level.struct); - scripts/core/gametypes/frontend.csc, line 1137
m_a_vat_contents = array(undefined, undefined, undefined); - scripts/core/gametypes/frontend_zm_bgb_chance.gsc, line 45
a_n_amounts = array(1, 5, 10, 100); - scripts/cp/_achievements.gsc, line 512
eplayer.var_75cf9e2e.var_6a670270 = array(eplayer.var_75cf9e2e.var_6a670270);
Related built-ins
- 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>.
- AssertMsg()Throws a script error with the given message.
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).