Damage types
The Damage Type property of a trigger_hurt entity lets you choose between many types of damage, but it may be hard to figure out what these types of damage do exactly, so below is a list (for Half-Life 2).
If nothing else is stated, each damage hit will (besides damaging you) make you jerk a little, make your screen flash red if you don't have a HEV suit, or provide red HUD directions to display where the damage is coming from if you have a HEV suit.
The damage caused depends on the current difficulty setting (
):
- The "Easy" (
skill 1) setting causes 50% of the Damage value every half-second. - The "Normal" (
skill 2) setting causes 100% of the Damage value every half-second. - The "Hard" (
skill 3) setting causes 150% of the Damage value every half-second.
: Always causes 50% of the Damage value every half-second.
The value for damage types are essentially bitflags. This means that multiple damage types can be specified at once where applicable. For instance, DMG_SHOCK have a value of 256 and DMG_DROWN have a value of 16384. Entering the sum of those (256 + 16384), 16640, would both cause the player's screen to flash blue, and a spark will appear near the player.
Damage type list
This is a list of every damage type available in the default FGDs.
Generic
- Nothing special.
- Damagetype: Value 0
Crush
- The whole screen flashes red even if you're wearing a HEV suit.
- Always does 50% of the Damage value every half-second, regardless of difficulty setting.
- Damagetype: Value 1
Bullet
- Plays bullet impact sounds.
- Damagetype: Value 2
Slash
- Displays spurts of blood if player HEV suit power is 0.
- Damagetype: Value 4
Burn
- Plays heat damage sounds. (Something sizzling and the player going "Ouch!".)
- The whole screen flashes red even if you're wearing a HEV suit.
- No HUD damage directions are given.
- (For additional indication, you can add an ambient_generic playing hl1/fvox/heat_damage.wav to make the HEV suit go: "Extreme heat damage detected.")
- Damagetype: Value 8
Freeze
- Nothing special.
A player killed by this type of damage will be displayed as being run over by a train.- When used in the Half-Life codebase, the HEV suit will display a snowflake icon on the left side of the screen.
- Damagetype: Value 16
Fall
- Always does 50% of the Damage value every half-second, regardless of difficulty setting.
- The HEV suit will not protect you from this type of damage.
A player killed by this type of damage will display the fall-specific kill feed line "fell to a clumsy, painful death".- Damagetype: Value 32
Blast
- Nothing special; may temporarily deafen the player.
A player killed by this type of damage will leave gibs instead of a ragdoll.- Damagetype: Value 64
Club
- Nothing special.
A player killed by this type of damage will emit their dramatic death sounds (Team Fortress 2's melee weapons deal this type of damage).- Damagetype: Value 128
Shock
- Sparks for every hit.
- (For additional indication, you can add an ambient_generic playing hl1/fvox/shock_damage.wav to make the HEV suit go: "Electrical damage detected.")
- Damagetype: Value 256
Sonic
- Plays damage sounds.
- Damagetype: Value 512
Energy beam
- Nothing special.
- Damagetype: Value 1024
Drown
- The whole screen flashes blue even if you're wearing a HEV suit.
- Double HUD damage directions are given.
- Plays drowning sounds.
- Always does 50% of the Damage value every half-second, regardless of difficulty setting.
- The HEV suit will not protect you from this type of damage.
- Damagetype: Value 16384
Paralyze
- HEV suit warning: "Warning: Bloodtoxin levels detected." (hl1/fvox/blood_toxins.wav)
- Damagetype: Value 32768
Nerve gas
- HEV suit warning: "Warning: Biohazard detected." (hl1/fvox/biohazard_detected.wav)
A player killed by this type of damage will be displayed as a kill by a sawblade.- Damagetype: Value 65536
Poison
The type of damage a poison headcrab inflicts.
- The whole screen flashes yellow even if you're wearing a HEV suit. (This flash seems to stick sometimes, and may appear the next time the player is hurt.)
- The HEV suit will not protect you from this type of damage.
- Always does 50% of the Damage value every half-second, regardless of difficulty setting.
- HEV suit warns: "Warning: Bloodtoxin levels detected." (hl1/fvox/blood_toxins.wav)
- HUD displays: "Neurotoxin Detected Administering Antidote"
- The damage received is healed after awhile (even if the player is not wearing a suit, oddly enough).
Similar to GENERIC.- Damagetype: Value 131072
Radiation
- Close proximity to a trigger_hurt with this type of damage will set off the HEV suits Geiger counter.
- The HEV suit will not protect you from this type of damage.
- The whole screen flashes white even if you're wearing a HEV suit.
- Double HUD damage directions are given.
- HEV suit warning: "Warning: Hazardous radiation levels detected." (hl1/fvox/radiation_detected.wav)
- Damagetype: Value 262144
Drown recover
- Nothing special.
- Damagetype: Value 524288
Chemical
- The whole screen flashes white even if you're wearing a HEV suit. (This flash seems to stick sometimes, and may appear the next time the player is hurt.)
- Double HUD damage directions are given.
- HEV suit warning: "Warning: Hazardous chemical detected." (hl1/fvox/chemical_detected.wav)
Critical damage. Deals 200% of the Damage value.- Damagetype: Value 1048576
Slow burn
- Nothing special.
Uses the damage falloff formula (50% at 1024 units away from attacker's origin, 150% at point blank)- Damagetype: Value 2097152
Slow freeze
- Nothing special. This bit is set when attempting to use an env_entity_dissolver on a live player.
- Damagetype: Value 4194304
Damage type table
This table shows every damage type available in the game. Some of these are not in the default FGDs and have to be added manually.
| Name | Value | Info |
|---|---|---|
| DMG_GENERIC | 0 | Generic damage. |
| DMG_CRUSH | 1 | Damage from physics objects. |
| DMG_BULLET | 2 | Damage from bullets. |
| DMG_SLASH | 4 | Damage from most melee attacks (that scratch, lacerate, or cut). |
| DMG_BURN | 8 | Burn damage. |
| DMG_VEHICLE | 16 | Hit by a vehicle. |
| DMG_FALL | 32 | Damage from high falls. (can be used to disable player fall damage). |
| DMG_BLAST | 64 | Damage from explosives (ear-ringing effect). |
| DMG_CLUB | 128 | Damage from some enemy melee attacks (blunt or unarmed) e.g. Combine melee attack. |
| DMG_SHOCK | 256 | Damage from electricity (creates sparks and puff of smoke at damage position). |
| DMG_SONIC | 512 | Damage from supersonic objects. |
| DMG_ENERGYBEAM | 1024 | Laser or other high energy beam. |
| DMG_PREVENT_PHYSICS_FORCE !FGD | 2048 | Prevent a physics force (e.g. Gravity Gun Jump on Props). |
| DMG_NEVERGIB !FGD | 4096 | No damage type will be able to gib victims upon death. |
| DMG_ALWAYSGIB !FGD | 8192 | Any damage type can be made to gib victims upon death. |
| DMG_DROWN | 16384 | Damage from drowning. |
| DMG_PARALYZE | 32768 | Damage from paralyzing. |
| DMG_NERVEGAS | 65536 | Damage from nervegas. (GLaDOS's gas from the ending of Portal). |
| DMG_POISON | 131072 | Damage from poison (e.g. black head crabs). |
| DMG_RADIATION | 262144 | Damage from radiation (Geiger counter will also go off). |
| DMG_DROWNRECOVER | 524288 | Drowning recovery (health regained after surfacing). |
| DMG_ACID | 1048576 | Damage from dangerous acids. (gives a light-cyan flash ingame). |
| DMG_SLOWBURN | 2097152 | Slow burning. |
| DMG_REMOVENORAGDOLL !FGD | 4194304 | No ragdoll will be created, and the target will be quietly removed. |
| DMG_PHYSGUN !FGD | 8388608 | Damage from the Gravity Gun (e.g. pushing head crabs). |
| DMG_PLASMA !FGD | 16777216 | Turns the player's screen dark and plays sounds until the player's next footstep. |
| DMG_AIRBOAT !FGD | 33554432 | Damage from airboat gun. |
| DMG_DISSOLVE !FGD | 67108864 | Damage from combine technology e.g. combine balls and the core. |
| DMG_BLAST_SURFACE !FGD | 134217728 | A blast on the surface of water that cannot harm things underwater |
| DMG_DIRECT !FGD | 268435456 | Damage from being on fire.(DMG_BURN relates to external sources hurting you) |
| DMG_BUCKSHOT !FGD | 536870912 | Damage from shotguns. (not quite a bullet. Little, rounder, different.) |
| DMG_LASTGENERICFLAG !FGD | 1073741824 | |
| DMG_HEADSHOT !FGD | 2147483648 | Damage from a headshot. |