GSC reference › Built-in
GetDamageableEntArray()
Built-in (engine)
Server
Returns the entities that can be damaged. Can optionally take an origin, radius, and a flag to check 3D.
Signature
GetDamageableEntArray([origin], [radius], [checkZ])
Parameters
| Name | Required? | Details |
|---|---|---|
| origin | Optional | origin to check against |
| radius | Optional | max distance to origin |
| checkZ | Optional | if true then check distance in 3d |
Returns
entity
Example (from Treyarch's docs)
entities = GetDamageableEntArray( maxDist, true )
Real uses in BO3's scripts
Called 8 times in the decompiled scripts. A few, zombies first:
- scripts/shared/abilities/gadgets/_gadget_heat_wave.gsc, line 454
entities = getdamageableentarray(heatwave.origin, heatwave.radius, 1); - scripts/shared/abilities/gadgets/_gadget_shock_field.gsc, line 182
entities = getdamageableentarray(self.origin, weapon.gadget_shockfield_radius); - scripts/shared/challenges_shared.gsc, line 2735
entities = getdamageableentarray(origin, radius); - scripts/shared/weapons/_empgrenade.gsc, line 330
ents = getdamageableentarray(origin, radius); - scripts/mp/gametypes/escort.gsc, line 2214
entities = getdamageableentarray(self.origin, 108);
Related built-ins
- GetEntArray()Looks up entities by key and name and a return an array of the matched entities
- GetEntArrayFromArray()Searches given array entities by key and name and a return an array of the matched entities
- getdynentarray()Get a dynent array with the specified targetname
- GetTargetLockEntityArray()Get locked target
- GetEntArrayByType()Gets an array of entities that have the given the type of the entity ( for example, ET_MISSILE )
- array()Create an array
- GetEnt()Looks up entities by key and name
- IsArray()Checks whether this entity/variable is an array
- ArrayRemoveValue()Remove a value from an array (may affect multiple indexes)
- GetEntityNumber()Get the entity number of the entity
- GetAITeamArray()Returns an array of the human AI and vehicle AI
- GetCurrentWeapon()Gets the current player weapon
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).