Point hurt: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(-added see also, better internal name formatting, removed less relevant stuff)
(updated template usage and added the new "bypass ubercharge" spawnflag.)
Line 1: Line 1:
[[File:point_hurt.png|left|link=]]
{{lang|Point hurt}}
[[File:point_hurt.png|left]]


{{base_point|point_hurt}} It does damage to all entities in a radius around itself, with a specified delay. If 'Target Entity' is specified: the damage is only done to that entity, and radius is ignored. You will need to create a brush and then move that to an entity.
{{point ent|point_hurt}} It does damage to all entities in a radius around itself, with a specified delay. If 'Target Entity' is specified: the damage is only done to that entity, and radius is ignored. You will need to create a brush and then move that to an entity.
{{clr}}
{{clr}}
{{note|This entity can be parented, although by default it is missing the <code>parent</code> keyvalue from Valve's FGDs.}}
{{note|This entity can be parented, although by default it is missing the <code>parent</code> keyvalue from Valve's FGDs.}}
Line 8: Line 9:


== Keyvalues ==
== Keyvalues ==
{{KV|Target Entity|intn=DamageTarget|string|If specified, only this ''DamageTarget'' will take damage. Otherwise, all entities within the Radius will take damage. Evaluated when used. [[!activator]] accepted.}}
{{KV|Target Entity|intn=DamageTarget|string|If specified, only this ''DamageTarget'' will take damage. Otherwise, all entities within the Radius will take damage. Evaluated when used. {{ent|!activator}} accepted.}}
{{KV|Radius|intn=DamageRadius|float|All entities within this radius of this entity will take damage. If a <code>Target Entity</code> is specified, only that entity will take damage.}}
{{KV|Radius|intn=DamageRadius|float|All entities within this radius of this entity will take damage. If a <code>Target Entity</code> is specified, only that entity will take damage.}}
{{KV|Damage|intn=Damage|integer|Damage done to all affected entities each time this entity fires.}}
{{KV|Damage|intn=Damage|integer|Damage done to all affected entities each time this entity fires.}}
{{note|The specified amount of damage will be halved. Consider multiplying your amount of damage by 2 and using it as the Value.}}
{{note|The specified amount of damage will be halved. Consider multiplying your amount of damage by 2 and using it as the Value.}}
{{note|{{csgo}} It is possible that unlike trigger_hurt, point_hurt does not halve the damage for the reason of the damage being the damage per second, as you can manually edit the amount of time between triggers. Damage type CRUSH should ignore armor, and generic is known to halve when dealing with armored players.}}
{{note|{{csgo}} It is possible that unlike {{ent|trigger_hurt}}, <tt>point_hurt</tt> does not halve the damage for the reason of the damage being the damage per second, as you can manually edit the amount of time between triggers. Damage type CRUSH should ignore armor, and generic is known to halve when dealing with armored players.}}
{{warning|Negative values are changed to positive automatically when this entity spawns. A workaround is to change the <code>Damage</code> keyvalue using [[AddOutput]]. Only tested in {{tf2}}, might not do anything in other games.}}
{{warning|Negative values are changed to positive automatically when this entity spawns. A workaround is to change the <code>Damage</code> keyvalue using [[AddOutput]]. Only tested in {{tf2}}, might not do anything in other games.}}
{{KV|Delay|intn=DamageDelay|float|Delay between refires, in seconds.}}
{{KV|Delay|intn=DamageDelay|float|Delay between refires, in seconds.}}
{{KV|[[Damage types]]|intn=DamageType|choices|Type of damage to inflict on entities damaged.}}
{{KV|[[Damage types]]|intn=DamageType|choices|Type of damage to inflict on entities damaged.}}
{{damage type}}
{{damage type}}
{{KV Targetname}}
{{KV BaseEntity|noscroll=0}}
{{KV Parentname}}
 
==Flags==
{{Fl|1|Start Active}}
{{Fl|2|Bypass ÜberCharge|Allows the damage to bypass Medic's {{tfwiki|ÜberCharge}}.|nofgd=1|only={{tf2}}}}


== Inputs ==
== Inputs ==
Line 25: Line 29:
{{IO|TurnOff|Disable this entity. It will stop damaging entities.}}
{{IO|TurnOff|Disable this entity. It will stop damaging entities.}}
{{IO|Toggle|Toggle this entity between On/Off state.}}
{{IO|Toggle|Toggle this entity between On/Off state.}}
{{I Parentname}}
{{I BaseEntity|noscroll=0}}
 
==Outputs==
{{O BaseEntity|l4d=1}}


== See Also ==
== See Also ==
* [[trigger_hurt]]
* {{ent|trigger_hurt}}

Revision as of 18:32, 12 October 2022

English (en)Translate (Translate)
Point hurt.png

Template:Point ent It does damage to all entities in a radius around itself, with a specified delay. If 'Target Entity' is specified: the damage is only done to that entity, and radius is ignored. You will need to create a brush and then move that to an entity.

Note.pngNote:This entity can be parented, although by default it is missing the parent keyvalue from Valve's FGDs.
Note.pngNote:Victims of this entity will see it as the Inflictor and will see the !activator as the Attacker.
C++ In code, it is represented by theCPointHurtclass, defined in thepointhurt.cppfile.

Keyvalues

Target Entity (DamageTarget) <string>
If specified, only this DamageTarget will take damage. Otherwise, all entities within the Radius will take damage. Evaluated when used. !activator accepted.
Radius (DamageRadius) <float>
All entities within this radius of this entity will take damage. If a Target Entity is specified, only that entity will take damage.
Damage (Damage) <integer>
Damage done to all affected entities each time this entity fires.
Note.pngNote:The specified amount of damage will be halved. Consider multiplying your amount of damage by 2 and using it as the Value.
Note.pngNote:Counter-Strike: Global Offensive It is possible that unlike trigger_hurt, point_hurt does not halve the damage for the reason of the damage being the damage per second, as you can manually edit the amount of time between triggers. Damage type CRUSH should ignore armor, and generic is known to halve when dealing with armored players.
Warning.pngWarning:Negative values are changed to positive automatically when this entity spawns. A workaround is to change the Damage keyvalue using AddOutput. Only tested in Team Fortress 2, might not do anything in other games.
Delay (DamageDelay) <float>
Delay between refires, in seconds.
Damage types (DamageType) <choices>
Type of damage to inflict on entities damaged.
  • 0: GENERIC
  • 1: CRUSH
  • 2: BULLET
  • 4: SLASH
  • 8: BURN
  • 16: VEHICLE / (TRAIN Team Fortress 2)
  • 32: FALL
  • 64: BLAST
  • 128: CLUB
  • 256: SHOCK (Spawns particle with missing texture in Left 4 Dead 2)
  • 512: SONIC
  • 1024: ENERGYBEAM
  • 16384: DROWN
  • 32768: PARALYSE
  • 65536: NERVEGAS / (SAWBLADE Team Fortress 2)
  • 131072: POISON
  • 262144: RADIATION
  • 524288: DROWNRECOVER
  • 1048576: ACID / (CRITICAL Team Fortress 2)
  • 2097152: SLOWBURN
  • 4194304: REMOVENORAGDOLL
  • 16777216: FULLGIB (in Left 4 Dead seriesLeft 4 Dead series)
Note.pngNote:Some damage types are named incorrectly by default in base.fgd, instead using their GoldSource names.
  • VEHICLE is named FREEZE
  • ACID is named CHEMICAL
  • REMOVENORAGDOLL is named SLOWFREEZE
Tip.pngTip:Team Fortress 2 Team Fortress 2: Fancy damage effects such as decapitation, disintegration or ice/gold statues on death can be applied via VScript. See TakeDamageCustom function or the trigger example.


Flags

Start Active : [1]
Bypass ÜberCharge : [2] (only in Team Fortress 2) !FGD
Allows the damage to bypass Medic's Tfwiki favicon.png ÜberCharge.

Inputs

Hurt
Force a single fire, damaging either the Target Entity or all entities within the radius.
TurnOn
Enable this entity. It will start damaging entities everytime it fires, and refire based upon the specified Delay.
TurnOff
Disable this entity. It will stop damaging entities.
Toggle
Toggle this entity between On/Off state.


Outputs

See Also