This article's documentation is for Source 2. Click here for more information.

logic_npc_counter_radius

From Valve Developer Community
Jump to navigation Jump to search

logic_npc_counter_radius is a point entity available in all Source 2 Source 2 games. It does calculations based on the number of a specified type of NPC in a specified region.

Keyvalues

Name (targetname) <string>
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

Maximum Distance (distanceMax) <float>
Maximum distance to test for NPC
Start Disabled (startDisabled) <boolean>
Whether or not the entitiy should stay dormant until activated (with the Enable input).
Source Entity Name (sourceEntityName) <targetname>
Name of the entity to check distance from
On Min Count All (minCount) <integer>
The minimum count threshold of all npcs
On Max Count All (maxCount) <integer>
The maximum count threshold of all npcs
Min Factor All (minFactor) <integer>
The minimum count of all npcs for factor calculations
Max Factor All (maxFactor) <integer>
The maximum count of all npcs for factor calculations
Class name of NPC 1 to count (NPCType1) to Class name of NPC 1/2/3 to count (NPCType3) <npcclass>
NPC State 1 (NPCState1) to NPC State 3 (NPCState3) <choices>
Only match NPCs in this state
Value Description
-1 Any
0 None
1 Idle
2 Alert
3 Combaat
4 Script
5 Playdead
6 Prone
7 Dead
Invert State (invertState1) to {{{to}}} (invertState3) <boolean>
On Min Count 1 (minCount1) to On Min Count 3 (minCount3) <integer>
The minimum count threshold of npc 1/2/3
On Max Count 1 (maxCount1) to On Max Count 3 (maxCount3) <integer>
The maximum count threshold of npc 1/2/3
Min Factor 1 (minFactor1) to Min Factor 3 (minFactor3) <integer>
The minimum count of npc 1/2/3 for factor calculations
Max Factor 1 (maxFactor1) to Max Factor 3 (maxFactor3) <integer>
The maximum count of npc 1/2/3 for factor calculations
Default Dist 1 (defaultDist1) to Default Dist 3 (defaultDist3) <float>
The default minimum player distance of npc 1/2/3

Inputs

Enable
Enable the entity
Disable
Disable the entity
SetSourceEntity
Set the name of the entity to base this entities location on. This check will follow the entity as it moves.

Outputs

OnMinCountAll
Fired when the count of all npcs transitions to the min count or less.
OnMaxCountAll
Fired when the count of all npcs transitions to the max count or greater.
OnRangeFactorAll
Outputs the factor of the count of all npcs.
OnMinPlayerDistAll
Outputs distance to the NPC, of all NPCs, that is closest to player.
OnMinCount1 to OnMinCount3
Fired when the count of npc 1/2/3 transitions to the min count or less.
OnMaxCount1 to OnMaxCount3
Fired when the count of npc 1/2/3 transitions to the max count or greater.
OnRangeFactor1 to OnRangeFactor3
Outputs the factor of the count of npc 1/2/3.
OnMinPlayerDist1 to OnMinPlayerDist3
Outputs distance to the NPC, of NPCs 1, that is closest to player.