Npc enemyfinder: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
m (Robot: fixing template case.)
Line 39: Line 39:


== Flags ==
== Flags ==
*{{fl basenpc}}
*{{Fl BaseNPC}}


== Inputs ==
== Inputs ==

Revision as of 19:21, 19 January 2009

Template:Wrongtitle

Entity description

This NPC is invisible, immobile, and does not cause collisions. Its sole purpose is to notify the squad mates whenever an enemy comes into the its view.

Note.pngNote:Some keyvalues, spawnflags, effect flags, inputs, or outputs might not affect an NPC, based on the functionality and coding of the NPC.

Keyvalues

  • FieldOfView
<string> How far to look (1.0 = straight ahead, 0.0 = +/- 90 degrees, -1.0 = all directions)
  • MinSearchDist
<integer>
  • MaxSearchDist
<integer>
  • freepass_timetotrigger
<float> Amount of time an enemy is hidden after which a 'free pass' on reaquire is granted
  • freepass_duration
<float> After granted 'free pass', the amount of time a target is allowed before reaquire
  • freepass_movetolerance
<float> After granted 'free pass', the distance the target is allowed to move before reaquire
  • freepass_refillrate
<float> After free pass begins expiring, how much the time the target gets back for every second they hide again
  • freepass_peektime
<float> How long targets in cover are allowed to peek without penalty
  • StartOn
<boolean>

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.

Inputs

  • TurnOn
Turn on: Look for enemies
  • TurnOff
Turn off: Stop looking for enemies

Outputs

  • OnLostEnemies (in all games since Half-Life 2: Episode One)
Fires when the enemy finder has no enemies.
  • OnAcquireEnemies (in all games since Half-Life 2: Episode One)
Fires when the enemy finder acquires enemies.