Skip to main content

trigger_hurt

trigger_hurt icon
Brush entity

A trigger_hurt is a brush trigger that hurts the players, monsters and objects inside it, or heals them if you give it a negative damage.

Attributes​

KeyDescriptionDefault
Nametargetname

Triggering the entity turns it on or off, and Obey Trigger Mode sets how (see Trigger modes). Without a name, the trigger is always on.

Targettarget

The trigger fires this each time it hurts or heals something, and passes that entity on as the activator. See Common keys.

Delay before triggerdelay

Sets how many seconds the trigger waits before it fires the Target.

Default 0
KillTargetkilltarget

Removes the entities with this name each time the trigger fires its targets, and it works without a Target too. The name can end in *. See Entity triggering for more details.

Mastermaster

Names a master, and while the master is off, the trigger neither hurts anything nor fires its targets.

Move withSpirit of Half-Lifemovewith

Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.

If you leave this key empty, the entity doesn't move with anything.

Axis locksparentflags

Keeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.

Default 0
Damagedmg

Sets how much damage the trigger deals per second. It deals half of the value every 0.5 seconds, and a negative value heals.

If you leave this key empty, it is 0 and the trigger deals no damage.

Default 10
Untouchable entity nameFeaturefuluntouchable_ent_name

The trigger never hurts an entity with this class name or this name, for example monster_scientist.

Minimum health thresholdFeaturefulmin_health

The damage never takes health below this value, so something that already has this much health or less takes no damage. Empty or 0 means no minimum.

Gibbing policyFeaturefulgib_policy

Sets what happens to a body that this trigger kills.

  • Default (0) - The body only breaks into gibs if the damage takes its health far below 0
  • Always gib (1) - The body always breaks into gibs
  • Never gib (2) - The body never breaks into gibs
Default Default (0)
Damage Typedamagetype

Sets the kind of damage. Some types show an icon on the player's HUD or change a rule, and the rest deal plain damage like GENERIC.

The 21 choices
  • GENERIC (0) - Plain damage
  • CRUSH (1) - Plain damage
  • BULLET (2) - Plain damage
  • SLASH (4) - Plain damage
  • BURN (8) - Shows the fire icon
  • FREEZE (16) - Shows the cold icon
  • FALL (32) - Battery armor doesn't reduce it
  • BLAST (64) - Plain damage
  • CLUB (128) - Plain damage
  • SHOCK (256) - Shows the shock icon
  • SONIC (512) - Plain damage
  • ENERGYBEAM (1024) - Plain damage
  • DROWN (16384) - Shows the drowning icon, and battery armor doesn't reduce it
  • PARALYSE (32768) - Plain damage
  • NERVEGAS (65536) - Shows the nerve gas icon
  • POISON (131072) - Shows the poison icon. After the last hit, the player keeps losing 2 health every 2 seconds for about 10 seconds
  • RADIATION (262144) - Shows the radiation icon, and players near the trigger hear a Geiger counter
  • DROWNRECOVER (524288) - Gives the player back the health they lost to drowning, over a few seconds
  • CHEMICAL (1048576) - Shows the chemical icon
  • SLOWBURN (2097152) - Shows the fire icon
  • SLOWFREEZE (4194304) - Shows the cold icon
Default GENERIC (0)
Obey Trigger ModeFeaturefulSven Co-opm_iObeyTriggerMode

Sets how a trigger turns the entity on and off.

  • No (0) - Every trigger switches it, so on becomes off and off becomes on
  • Yes (1) - On turns it on, Off turns it off and Toggle switches it
Default No (0)

Flags​

1Target Once

Fires the Target and the KillTarget only the first time the trigger hurts something

2Start Off

The trigger starts off, and it needs a Name so you can turn it on

8No clients

Hurts monsters and objects, but not players

16FireClientOnly

Fires the Target only when the trigger hurts a player

32TouchClientOnly

Hurts only players

64Affect non-moving NPC'sFeatureful

Also hurts monsters that stand still inside the trigger, where normally it only hurts a monster while the monster moves. It doesn't work with the damage type RADIATION

128Full dmg every 0.5 secondsFeatureful

Deals the whole Damage every 0.5 seconds instead of half of it

256Ignore ArmorFeatureful

Battery armor doesn't reduce the damage, and the player keeps it (see Armor)

512No Camera PunchFeatureful

A player's view doesn't jerk when the trigger hurts them

Armor​

A player can have two kinds of armor, but only one of them works against a trigger.

  • Loadout armor - The armor skin, the cyber torso armor and the torso + skull armor (see Loadout). This armor only protects against hits on body parts, and a trigger doesn't hit a body part. So loadout armor never reduces trigger damage, and Ignore Armor makes no difference
  • Battery armor - Armor from an item_battery or a func_recharge, on a player with no loadout armor. It takes half of the damage, as in Half-Life, but not FALL or DROWN damage, and Ignore Armor turns it off for this trigger

Notes​

  • The trigger hurts every player inside it every 0.5 seconds
  • A healing trigger doesn't heal dead players, and it doesn't raise health above the maximum
  • With Affect non-moving NPC's, the trigger checks the box around the brush for monsters that stand still. If the brush isn't a box, a monster outside the brush can get hurt
  • If you set both No clients and TouchClientOnly, the trigger hurts nothing
  • In a rare case, a shot hits a player on a body part that their armor doesn't cover. Right after that, trigger damage to another player whose loadout armor covers that part is reduced, and that player hears a ricochet sound. Ignore Armor stops this

See also​

Changes since 1.38​

  • You can use the new keys Untouchable entity name, Minimum health threshold, Gibbing policy and Obey Trigger Mode
  • You can use the new flags Affect non-moving NPC's, Full dmg every 0.5 seconds, Ignore Armor and No Camera Punch
  • Fixed a healing trigger_hurt healing dead players. It did not check that the player was alive. This was a bug in SBO 1.38
  • Fixed the Master key doing nothing on button_target, trigger_hurt, trigger_push, trigger_monsterjump, momentary_rot_button and a triggered game_player_equip. These entities never checked their Master, so they worked while locked
  • Fixed a trigger_hurt with only a Kill target not removing that target. It fired its targets only when it also had a Target