Info snipertarget: Difference between revisions
Jump to navigation
Jump to search
m (link) |
(Updated Keyvalues names) |
||
Line 1: | Line 1: | ||
{{wrongtitle|title=info_snipertarget}} | {{wrongtitle|title=info_snipertarget}} | ||
= | {{hl2 point|info_target_snipertarget|sprite=info_target}} | ||
An [[npc_sniper]] will take shots at this target, but only if he is told to (with the ''SweepTarget'', ''SweepTargetHighestPriority'' or ''SweepGroupRandomly'' [[input]]s). (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.) | An [[npc_sniper]] will take shots at this target, but only if he is told to (with the ''SweepTarget'', ''SweepTargetHighestPriority'' or ''SweepGroupRandomly'' [[input]]s). (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.) | ||
Line 11: | Line 11: | ||
* {{KV Targetname}} | * {{KV Targetname}} | ||
* {{KV Parentname}} | * {{KV Parentname}} | ||
*''' | *'''Sweep to Speed''' <[[float]]> | ||
: Sweep to speed. (Default 2) | |||
*''' | *'''Group Name''' <[[string]]> | ||
:The name of the group which the info_snipertarget belongs to. Used as a parameter for ''SweepGroupRandomly'' inputs. | :The name of the group which the info_snipertarget belongs to. Used as a parameter for ''SweepGroupRandomly'' inputs. | ||
Line 39: | Line 38: | ||
* {{O Targetname}} | * {{O Targetname}} | ||
==See | ==See also== | ||
* [[npc_sniper]] | * [[npc_sniper]] | ||
[[category:Entities]] | [[category:Entities]] |
Revision as of 07:23, 14 September 2011
Template:Wrongtitle Template:Hl2 point 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
ortarget
).
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.
- Sweep to Speed <float>
- Sweep to speed. (Default 2)
- Group Name <string>
- 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
)
- 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 <string >
- Move with this entity. See Entity Hierarchy (parenting).
- SetParentAttachment <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 <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.