GSC reference › Built-in
IsArray()
Built-in (engine)
Server + client
Utility
Checks whether this entity/variable is an array
Signature
IsArray(<variable>)
Parameters
| Name | Required? | Details |
|---|---|---|
| variable | Required | variable that may or may not be a array |
Example (from Treyarch's docs)
if ( isarray ( gun_owner )) ...
Real uses in BO3's scripts
Called 1,149 times in the decompiled scripts. A few, zombies first:
- scripts/shared/_oob.gsc, line 78
else if(!isarray(level.oob_triggers)) - scripts/shared/ai_shared.csc, line 65
else if(!isarray(level.spawn_funcs[archetype])) - scripts/shared/ai_sniper_shared.gsc, line 285
if(!isdefined(entity_or_point_array) || (isarray(entity_or_point_array) && entity_or_point_array.size == 0)) - scripts/shared/animation_shared.csc, line 279
else if(!isarray(level._animnotetrackhandlers[str_note])) - scripts/shared/animation_shared.gsc, line 589
else if(!isarray(level._animnotetrackhandlers[str_note]))
Related built-ins
- array()Create an array
- ArrayRemoveValue()Remove a value from an array (may affect multiple indexes)
- 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
- ArrayGetClosest()Returns the entity/vector that is closest to the <origin> from the <array>.
- ArrayRemoveIndex()Remove a value from an array at a given index
- ArrayCopy()Returns a copy of an array
- ArrayInsert()Insert a value into an array at a given index
- associativeArray()Creates an associativeArray
- ArrayGetFarthest()Returns the entity/vector that is farthest to the <origin> from the <array>.
- ArrayIntersect()Returns an array of values that are present in both arrays.
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).