npc_enemyfinder
Jump to navigation
Jump to search
npc_enemyfinder
is a point entity available in all Source games.
Class hierarchy |
---|
CNPC_EnemyFinder |
npc_enemyfinder.cpp |
Note:Not in Black Mesa: Definitive Edition, it is available only in Black Mesa 2012. Use func_tanktrain instead.
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 its view so put it into the same squad as NPCs whose enemies npc_enemyfinder has to consider its enemies.
When running ent_text
command on npc_enemyfinder, colourful lines start pointing from it towards player and other NPCs.
- Blue lines mean that NPCs that this entity is in squad together with consider the entity that the line points towards to neutral.
- Red lines mean that they hate that entity.
Note:Some keyvalues, spawnflags, effect flags, inputs, or outputs might not affect an NPC, based on the functionality and coding of the NPC.
Keyvalues
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.
- FieldOfView (FieldOfView) <string>
- Min Search Dist (MinSearchDist) <integer>
- Max Search Dist (MaxSearchDist) <integer>
- Player pass issue time (freepass_timetotrigger) <float>
- Amount of time an enemy is hidden after which a 'free pass' on reaquire is granted.
- Player pass duration (freepass_duration) <float>
- After granted 'free pass', the amount of time a target is allowed before reaquire.
- Player pass move tolerance (freepass_movetolerance) <float>
- After granted 'free pass', the distance the target is allowed to move before reaquire.
- Player pass refill rate (freepass_refillrate) <float>
- After free pass begins expiring, how much the time the target gets back for every second they hide again.
- Player pass peek time (freepass_peektime) <float>
- How long targets in cover are allowed to peek without penalty.
- Start On (StartOn) <boolean>
Flags
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.
- TurnOn
- Turn on: Look for enemies.
- TurnOff
- Turn off: Stop looking for enemies.
Outputs
- OnLostEnemies
- Fires when the enemy finder has no enemies.
- OnAcquireEnemies
- Fires when the enemy finder acquires enemies.
See also
- npc_enemyfinder_combinecannon - Special version of this entity.