Info snipertarget

From Valve Developer Community
Revision as of 00:45, 22 September 2010 by Thelonesoldier (talk | contribs) (link)
Jump to navigation Jump to search

Template:Wrongtitle

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.


Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Parentname:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
  • 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.

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 (in all games since Half-Life 2: Episode One)
  • 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.

Inputs

Parentname:
SetParent <stringRedirectInput/string>
Move with this entity. See Entity Hierarchy (parenting).
SetParentAttachment <stringRedirectInput/string>
Change this entity to attach to a specific attachment point on its parent. The entity will teleport so that the position of its root bone matches that of the attachment. Entities must be parented before being sent this input.
SetParentAttachmentMaintainOffset <stringRedirectInput/string>
As above, but without teleporting. The entity retains its position relative to the attachment at the time of the input being received.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.

Outputs

See Also