logic_npc_counter_radius
Does calculations based on the number of a specified type of NPC in a specified region.
- FGD
@PointClassingame/core/base.fgd, basesTargetname, LogicNPCCounterPointBase.
CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2
Inputs (18)
| Name | Parameter | From | Description |
|---|---|---|---|
RunScriptFile | string | VScript | Load and execute a script file |
RunScriptCode | string | VScript | Execute a fragment of script code |
CallScriptFunction | string | VScript | Call a script function |
CallPrivateScriptFunction | string | VScript | Calls a script function from this entity's private script scope. |
CallGlobalScriptFunction | string | VScript | Calls a script function in the global script scope. |
Kill | GameEntity | Removes this entity from the world. | |
KillHierarchy | GameEntity | Removes this entity and all its children from the world. | |
KillConstrained | GameEntity | Removes this entity, all its children, and anything constrained to it, from the world. | |
AddOutput | string | GameEntity | Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care. |
FireUser1 | GameEntity | Causes this entity's OnUser1 output to be fired. | |
FireUser2 | GameEntity | Causes this entity's OnUser2 output to be fired. | |
FireUser3 | GameEntity | Causes this entity's OnUser3 output to be fired. | |
FireUser4 | GameEntity | Causes this entity's OnUser4 output to be fired. | |
EnableAutoSleeping | GameEntity | Enable automatic sleeping on this entity's physics bodies. When enabled, physics bodies go to sleep when at rest. | |
DisableAutoSleeping | GameEntity | Disable automatic sleeping on this entity's physics bodies. Bodies remain awake until explicitly put to sleep. | |
Enable | LogicNPCCounterPointBase | Enable the entity | |
Disable | LogicNPCCounterPointBase | Disable the entity | |
SetSourceEntity | string | LogicNPCCounterPointBase | Set the name of the entity to base this entities location on. This check will follow the entity as it moves. |
Outputs (21)
| Name | Parameter | From | Description |
|---|---|---|---|
OnUser1 | GameEntity | Fired in response to FireUser1 input. | |
OnUser2 | GameEntity | Fired in response to FireUser2 input. | |
OnUser3 | GameEntity | Fired in response to FireUser3 input. | |
OnUser4 | GameEntity | Fired in response to FireUser4 input. | |
OnKilled | GameEntity | Fired when the entity is killed and removed from the game. Parameter is the inflictor. | |
OnMinCountAll | LogicNPCCounterPointBase | Fired when the count of all npcs transitions to the min count or less. | |
OnMaxCountAll | LogicNPCCounterPointBase | Fired when the count of all npcs transitions to the max count or greater. | |
OnRangeFactorAll | float | LogicNPCCounterPointBase | Outputs the factor of the count of all npcs. |
OnMinPlayerDistAll | float | LogicNPCCounterPointBase | Outputs distance to the NPC, of all NPCs, that is closest to player. |
OnMinCount1 | LogicNPCCounterPointBase | Fired when the count of npc 1 transitions to the min count or less. | |
OnMaxCount1 | LogicNPCCounterPointBase | Fired when the count of npc 1 transitions to the max count or greater. | |
OnRangeFactor1 | float | LogicNPCCounterPointBase | Outputs the factor of the count of npc 1. |
OnMinPlayerDist1 | float | LogicNPCCounterPointBase | Outputs distance to the NPC, of NPCs 1, that is closest to player. |
OnMinCount2 | LogicNPCCounterPointBase | Fired when the count of npc 2 transitions to the min count or less. | |
OnMaxCount2 | LogicNPCCounterPointBase | Fired when the count of npc 2 transitions to the max count or greater. | |
OnRangeFactor2 | float | LogicNPCCounterPointBase | Outputs the factor of the count of npc 2. |
OnMinPlayerDist2 | float | LogicNPCCounterPointBase | Outputs distance to the NPC, of NPCs 2, that is closest to player. |
OnMinCount3 | LogicNPCCounterPointBase | Fired when the count of npc 3 transitions to the min count or less. | |
OnMaxCount3 | LogicNPCCounterPointBase | Fired when the count of npc 3 transitions to the max count or greater. | |
OnRangeFactor3 | float | LogicNPCCounterPointBase | Outputs the factor of the count of npc 3. |
OnMinPlayerDist3 | float | LogicNPCCounterPointBase | Outputs distance to the NPC, of NPCs 3, that is closest to player. |
Keyvalues (33)
The names Hammer saves and the KeyValue input and AddOutput take at run time. An entity reads some keys only when it spawns, so changing one later may do nothing. Integer keys such as movetype take engine numbers, not the renumbered cs_script enum values.
| Key | Type | Default | From | Description |
|---|---|---|---|---|
vscriptsEntity Scripts | scriptlist | VScript | Name(s) of script files that are executed after all entities have spawned. | |
targetnameName | target_source | Targetname | The name that other entities refer to this entity by. | |
startDisabledStart Disabled | bool | 0 | LogicNPCCounterPointBase | |
sourceEntityNameSource Entity Name | target_destination | LogicNPCCounterPointBase | Name of the entity to check distance from | |
minCountOn Min Count All | int | -1 | LogicNPCCounterPointBase | The minimum count threshold of all npcs |
maxCountOn Max Count All | int | -1 | LogicNPCCounterPointBase | The maximum count threshold of all npcs |
minFactorMin Factor All | int | 0 | LogicNPCCounterPointBase | The minimum count of all npcs for factor calculations |
maxFactorMax Factor All | int | 0 | LogicNPCCounterPointBase | The maximum count of all npcs for factor calculations |
NPCType1Class name of NPC 1 to count | npcclass | LogicNPCCounterPointBase | ||
NPCState1NPC State 1 | intchoices | -1 | LogicNPCCounterPointBase | Only match NPCs in this state
|
invertState1Invert State | bool | 0 | LogicNPCCounterPointBase | |
minCount1On Min Count 1 | int | -1 | LogicNPCCounterPointBase | The minimum count threshold of npc 1 |
maxCount1On Max Count 1 | int | -1 | LogicNPCCounterPointBase | The maximum count threshold of npc 1 |
minFactor1Min Factor 1 | int | 0 | LogicNPCCounterPointBase | The minimum count of npc 1 for factor calculations |
maxFactor1Max Factor 1 | int | 0 | LogicNPCCounterPointBase | The maximum count of npc 1 for factor calculations |
defaultDist1Default Dist 1 | float | 0 | LogicNPCCounterPointBase | The default minimum player distance of npc 1 |
NPCType2Class name of NPC 2 to count | npcclass | LogicNPCCounterPointBase | ||
NPCState2NPC State 2 | intchoices | -1 | LogicNPCCounterPointBase | Only match NPCs in this state
|
invertState2Invert State | bool | 0 | LogicNPCCounterPointBase | |
minCount2On Min Count 2 | int | -1 | LogicNPCCounterPointBase | The minimum count threshold of npc 2 |
maxCount2On Max Count 2 | int | -1 | LogicNPCCounterPointBase | The maximum count threshold of npc 2 |
minFactor2Min Factor 2 | int | 0 | LogicNPCCounterPointBase | The minimum count of npc 2 for factor calculations |
maxFactor2Max Factor 2 | int | 0 | LogicNPCCounterPointBase | The maximum count of npc 2 for factor calculations |
defaultDist2Default Dist 2 | float | 0 | LogicNPCCounterPointBase | The default minimum player distance of npc 2 |
NPCType3Class name of NPC 3 to count | npcclass | LogicNPCCounterPointBase | ||
NPCState3NPC State 3 | intchoices | -1 | LogicNPCCounterPointBase | Only match NPCs in this state
|
invertState3Invert State | bool | 0 | LogicNPCCounterPointBase | |
minCount3On Min Count 3 | int | -1 | LogicNPCCounterPointBase | The minimum count threshold of npc 3 |
maxCount3On Max Count 3 | int | -1 | LogicNPCCounterPointBase | The maximum count threshold of npc 3 |
minFactor3Min Factor 3 | int | 0 | LogicNPCCounterPointBase | The minimum count of npc 3 for factor calculations |
maxFactor3Max Factor 3 | int | 0 | LogicNPCCounterPointBase | The maximum count of npc 3 for factor calculations |
defaultDist3Default Dist 3 | float | 0 | LogicNPCCounterPointBase | The default minimum player distance of npc 3 |
distanceMaxMaximum Distance | float | 25.0 | Maximum distance to test for NPC |