GSC reference › Built-in
AddToDamageIndicator()
Built-in (engine)
Server
Player Called on: client
Add damage to damage indicator
Signature
<client> AddToDamageIndicator(<dmg>, [direction])
Called on an entity: client AddToDamageIndicator(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| dmg | Required | The damage |
| direction | Optional | The direction of hit |
Example (from Treyarch's docs)
self AddToDamageIndicator( int( armor_damage ), vDir)
Real uses in BO3's scripts
Called 3 times in the decompiled scripts. A few, zombies first:
- scripts/shared/abilities/gadgets/_gadget_armor.gsc, line 433
self addtodamageindicator(int(armor_damage * getdvarfloat("scr_armor_mod_view_kick_mult", 0.001)), vdir); - scripts/cp/cp_mi_cairo_aquifer_utility.gsc, line 3951
self addtodamageindicator(damage, dir); - scripts/cp/gametypes/_globallogic_vehicle.gsc, line 222
driver addtodamageindicator(damagepct, vdir);
Related built-ins
- ClearDamageIndicator()Clear damage indicator
- NewDamageIndicatorHudElem()Create a new hud element for a particular client
- SetDamageDirectionIndicator()Use the armor version of the hit indicator
- DamageRiotShield()Apply damage to a player riot shield or other weapon that supports damage states.
- FinishPlayerDamage()Does damage to a player - usually as part of the damage callback
- FakeDamageFrom()Make the player take damage from the given direction
- SetVehicleDamageMeter()Sets the vehicle damage meter
- DoDamage()Does damage to this entity
- SetCanDamage()Set the candamage flag for this entity - this means that it can respond to notifies from bullets and grenade hits
- RadiusDamage()
- DamageConeTrace()Determines how much the entity can be seen from the given position.
- FinishVehicleDamage()Does damage to an vehicle - usually as part of the damage callback
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).