Npc sniper

From Valve Developer Community
Revision as of 19:21, 19 January 2009 by VDCBot (talk | contribs) (Robot: fixing template case.)
Jump to navigation Jump to search

Template:Wrongtitle

Entity Description

Sniper

A combine sniper. This Combine soldier is wielding a sniping weapon with a blue laser sight, making it capable of extreme accuracy at extreme range.

The npc_sniper does not actually have its own model - rather, it uses a Combine soldier model in-game (if its Hidden flag is not set) playing its idle animation, with the rifle's laser coming from the center of the hull. For acceptible sniper damage, only blasts and burning hurt damage that are powerful enough to kill are allowed.

The sniper doesn't turn on his sight until after he sees the player or an NPC within an acceptable range and angle, and will turn it off again after he is done. He will prioritize the player over any other target. If he loses track of the player, he will get frustrated and shoot three rounds at the area where the player was last seen, often targeting smaller prop_physics (like soda cans, melons, melon chunks, cinderblocks, ...) but not large prop_physics (like soda machines). He will then resume to targeting any other visible targets.

He will pay attention to info_snipertargets if ordered to (with the SweepTarget, SweepTargetHighestPriority or SweepGroupRandomly inputs).

Keyvalues

  • radius
<integer> Patience Radius
  • misses
<integer> Initial Misses
  • beambrightness
<integer> Beam Brightness (0 to 255)
  • shielddistance
<float> Bullet shield distance. Obsolete (in all games since Half-Life 2: Episode One)
  • shieldradius
<float> Bullet shield radius. Obsolete (in all games since Half-Life 2: Episode One)

Flags

BaseNPC flags 
Wait Till Seen : [1]
Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
Gag : [2]
Won't make IDLE sounds until it's angry.
Fall to ground (unchecked means teleport to ground) : [4]
Drop Healthkit : [8]
Causes this NPC to drop an item_healthvial upon dying.
Efficient : [16]
Don't acquire enemies or avoid obstacles
Wait For Script : [128]
Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
Long Visibility/Shoot : [256]
By default, increases a NPC's sight range to 6,000 units and allows it to attack from anywhere within that distance.
Fade Corpse : [512]
Think outside PVS : [1024]
Allows this NPC to run its regular AI outside of any player's PVS.
Template NPC : [2048]
Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
Do Alternate collision for this NPC (player avoidance) : [4096]
Note.pngNote:This flag is disabled in Half-Life 2: Episode One Half-Life 2: Episode Two episodic for player companions, because the StartScripting input does this.
Don't drop weapons : [8192]
Ignore player push : [16384] (in all games since Source 2006)
Entity won't give way to player.
  • 65536 : Hidden
The sniper will not have a model while alive. Should be checked.
  • 131072 : Laser Viewcone
  • 262144 : No Corpse
The sniper leaves no corpse.
  • 524288 : Start Disabled
  • 1048576 : Faster shooting (in all games since Half-Life 2: Episode One)

Inputs

  • EnableSniper
Enable Shooting
  • DisableSniper
Disable Shooting
  • SetDecoyRadius <integer>
Set Decoy Radius
  • SweepTarget <target_destination>
Makes the sniper sweep to an info_snipertarget specified in the parameter, with a behavior specified in the properties of the info_snipertarget.
Note.pngNote:Using this input to set the sniper's target to anything enclosed or touching a Block LOS textured brush may cause the map to crash.
  • SweepTargetHighestPriority <target_destination>
Same as SweepTarget, but the sniper will prioritize sweeping to this target above targeting anything else, including the player.
  • SweepGroupRandomly <string>
The sniper will take alternating shots at info_snipertargets belonging to a specific group (specified in its parameter) until interrupted by an NPC. (Group associations are declared in the Group Name property of these targets.)
  • StopSweeping (in all games since Half-Life 2: Episode One)
Stop any target sweeping operation started by entity I/O
  • ProtectTarget <target_destination> (in all games since Half-Life 2: Episode One)
Protect the specified target. The sniper will attempt to shoot the enemy nearest the protect target at all times."

Outputs

(!activator is the Sniper's current enemy)

See Also

Template:Otherlang:en Template:Otherlang:en:ru