Info snipertarget
From Valve Developer Community
| Table of contents |
[edit]
Entity Description
An npc_sniper will take shots at this target, but only if he is told to (with the SweepTarget, SweepTargetHighestPriority or SweepGroupRandomly inputs). (You can not make the sniper take shots at something by naming an entity as the target or by using a normal info_target entity. He will just ignore such inputs.)
The info_snipertarget has several parameters that will determine the snipers behavior toward this target.
To make the sniper take shots at a moving target, you'll need to parent the info_snipertarget to it, but there is currently a bug preventing the sniper from actually hitting parented targets.
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- parentname <target_destination>
- Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
- speed
- <float> Sweep to speed
- groupname
- <string> Group Name
- The name of the group which the info_snipertarget belongs to. Used as a parameter for SweepGroupRandomly inputs.
[edit]
Flags
- 1 : Shoot Me
- Probably makes the sniper take a shot at this target after having swept to it, but a crash bug currently prevents me from confirming this, so until it has been fixed always keep this flag checked.
- 2 : No Interruptions
- Seeing the player or NPCs will not distract the sniper from taking the shot at this target.
- 4 : Snap Shot
- If a more important target comes into view as the sniper is aiming for this target, he will fire a so called "snap shot" before aiming for the more important target, hoping his current aim will be accurate enough to hit it. This shot will still count as interrupted, and the sniper will therefore resume to take another shot if the Resume if Interrupted flag is set for this target. Obsolete [Episode One Update]
- 8 : Resume if Interrupted
- If the sniper is busy taking shots at other targets when he is ordered to take a shot at this target, he will just delay the shot at this target until he is done, instead of ignoring it completely. This is unless he is ordered to take another shot in this time.
- 16 : Snap to me
- The sniper will set his sight on this target before turning the dot on. This means that the dot will immediately start fixed at this position.
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- SetParent <target_destination>
- Changes the entity's parent in the movement hierarchy.
- SetParentAttachment <string>
- Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
- SetParentAttachmentMaintainOffset <string> [Episode One Update]
- Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
- Removes this entity from its current movement hierarchy.
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
[edit]
