CTriggerHurt
Jump to navigation
Jump to search
Code classes:
CTriggerHurt
CBaseTrigger
(triggers)CBaseToggle
CBaseEntity
(all ents)
CTriggerHurt
is a code class in every Source game.
Classnames:
trigger_hurt
- Hurts things that enter the volume. Pierces ubercharge and other damage resistance in .
Bug: In , damages half as much as it should. If Damage is 1, it might get reduced to 0.5 and rounded down to 0. Double all your damage amounts! To do: Cause not found.
Note: trigger_hurt
s that are compiled into entity groups are converted to the entity script_trigger_hurt
.
Note: Does not hurt unspawned player zombies in Versus mode. See trigger_hurt_ghost
.
Keyvalues[edit | edit source]
- Damage
(damage)
<float>
- How much damage to do every half-second. Note: This amount is factored into the force that objects will take when hit.
- Damage Cap
(damagecap)
<float>
- Maximum amount of damage to do when using Doubling with forgiveness as the Damage Model.
- Damage Model
(damagemodel)
<choices>
- Controls how damage is applied.
- 0: Normal - Straightforward; applies Damage every half-second.
- 1: Doubling with forgiveness - Damage doubles until all hurtable entities have left the trigger for three seconds.
- Bug: In some games the damage will not reset to its initial value when using Doubling with forgiveness.
- Fix: A
logic_timer
rapidly enabling and disabling the trigger somehow fixes it.
- Fix: A
- Zero Damage Force
(nodmgforce)
<boolean>
- If yes, cancels any physics force the hurt entity might receive.
- Damage Type
(damagetype)
<choices>
- What kind of damage to do. See here for info on every type.
- Always think every frame
(thinkalways)
<boolean>
(only available in ) - Makes the trigger hurt objects every tick, instead of every half-second. Use this to make players skip being incapacitated for a moment.
Damage Force Override(damageforce)
<vector>
(only available in )- Doesn't work.
Inputs[edit | edit source]
- SetDamage
<float>
- Sets Damage.
Outputs[edit | edit source]
- OnHurt
- Fires when the trigger hurts something that is NOT a player.
- OnHurtPlayer
- Fires when the trigger hurts a player.