GSC reference › Built-in
ArrayRemoveValue()
Built-in (engine)
Server + client
Utility
Remove a value from an array (may affect multiple indexes)
Signature
ArrayRemoveValue(<array>, <value>, [preserve_keys])
Parameters
| Name | Required? | Details |
|---|---|---|
| array | Required | array to operate on |
| value | Required | value to remove (may be undefined) |
| preserve_keys | Optional | defaults to false, if true then it preserves the keys - otherwise creates integer keys |
Real uses in BO3's scripts
Called 513 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm.csc, line 1578
arrayremovevalue(self._zombie_visionset_list, temp_struct); - scripts/zm/_zm.gsc, line 845
arrayremovevalue(spawnpoints, spawnpoints[i]); - scripts/zm/_zm_ai_monkey.gsc, line 1974
arrayremovevalue(level.monkey_grenades, self); - scripts/zm/_zm_ai_napalm.gsc, line 972
arrayremovevalue(level.burning_zombies, self); - scripts/zm/_zm_ai_raps.gsc, line 955
arrayremovevalue(level.a_zombie_respawn_health[self.archetype], level.a_zombie_respawn_health[self.archetype][0]);
Related built-ins
- ArrayRemoveIndex()Remove a value from an array at a given index
- SetUIModelValue()Sets a UIModel from the model being passed in.
- SetValue()Set a value HUD element to a given value.
- Target_Remove()Removes a target
- SetControllerUIModelValue()Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
- WeaponLockRemoveSlot()Removes the given slot values and compresses the remaining slots (i.e.
- GetUIModelValue()Returns the value of the UIModel passed in.
- RemoveInfluencer()Removes the given influencer
- GetStealthSightValue()Get the current stealth sight value for this sentient seeing another sentient (floating point from 0.0 to 1.0)
- RemoveFriendlyScrambler()Removes new friendly scrambler from the compass using the same handle you gave when creating it
- SetStealthSightValue()Set the current stealth sight value for this sentient seeing another sentient (floating point from 0.0 to 1.0)
- CloneAndRemoveEntity()Creates a new entity at the position/orientation/pose of the original, and kills the original
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).