Skip to main content

logic_npc_counter_obb

logic_npc_counter_obb icon

Point Entity

Does calculations based on the number of a specified type of NPC in a specified region.

Keyvalues

  • Start Disabled (startDisabled) <Boolean>

  • Source Entity Name (sourceEntityName) <TargetDestination>
    Name of the entity to check distance from

  • On Min Count All (minCount) <Int>
    The minimum count threshold of all npcs

  • On Max Count All (maxCount) <Int>
    The maximum count threshold of all npcs

  • Min Factor All (minFactor) <Int>
    The minimum count of all npcs for factor calculations

  • Max Factor All (maxFactor) <Int>
    The maximum count of all npcs for factor calculations

  • Class name of NPC 1 to count (NPCType1) <NPCClass>

  • NPC State 1 (NPCState1) <Choices>
    Only match NPCs in this state

    • Any
    • None
    • Idle
    • Alert
    • Combat
    • Script
    • Playdead
    • Prone
    • Dead
  • Invert State (invertState1) <Boolean>

  • On Min Count 1 (minCount1) <Int>
    The minimum count threshold of npc 1

  • On Max Count 1 (maxCount1) <Int>
    The maximum count threshold of npc 1

  • Min Factor 1 (minFactor1) <Int>
    The minimum count of npc 1 for factor calculations

  • Max Factor 1 (maxFactor1) <Int>
    The maximum count of npc 1 for factor calculations

  • Default Dist 1 (defaultDist1) <Float>
    The default minimum player distance of npc 1

  • Class name of NPC 2 to count (NPCType2) <NPCClass>

  • NPC State 2 (NPCState2) <Choices>
    Only match NPCs in this state

    • Any
    • None
    • Idle
    • Alert
    • Combat
    • Script
    • Playdead
    • Prone
    • Dead
  • Invert State (invertState2) <Boolean>

  • On Min Count 2 (minCount2) <Int>
    The minimum count threshold of npc 2

  • On Max Count 2 (maxCount2) <Int>
    The maximum count threshold of npc 2

  • Min Factor 2 (minFactor2) <Int>
    The minimum count of npc 2 for factor calculations

  • Max Factor 2 (maxFactor2) <Int>
    The maximum count of npc 2 for factor calculations

  • Default Dist 2 (defaultDist2) <Float>
    The default minimum player distance of npc 2

  • Class name of NPC 3 to count (NPCType3) <NPCClass>

  • NPC State 3 (NPCState3) <Choices>
    Only match NPCs in this state

    • Any
    • None
    • Idle
    • Alert
    • Combat
    • Script
    • Playdead
    • Prone
    • Dead
  • Invert State (invertState3) <Boolean>

  • On Min Count 3 (minCount3) <Int>
    The minimum count threshold of npc 3

  • On Max Count 3 (maxCount3) <Int>
    The maximum count threshold of npc 3

  • Min Factor 3 (minFactor3) <Int>
    The minimum count of npc 3 for factor calculations

  • Max Factor 3 (maxFactor3) <Int>
    The maximum count of npc 3 for factor calculations

  • Default Dist 3 (defaultDist3) <Float>
    The default minimum player distance of npc 3

  • Box Outer Mins (box_outer_mins) <Vector>

  • Box Outer Maxs (box_outer_maxs) <Vector>

  • Entity Scripts (vscripts) <ScriptList>
    Name(s) of script files that are executed after all entities have spawned.

  • Name (targetname) <TargetSource>
    The name that other entities refer to this entity by.

Inputs

  • Enable <Void>
    Enable the entity

  • Disable <Void>
    Disable the entity

  • SetSourceEntity <String>
    Set the name of the entity to base this entities location on. This check will follow the entity as it moves.

  • RunScriptFile <String>
    Load and execute a script file

  • RunScriptCode <String>
    Execute a fragment of script code

  • CallScriptFunction <String>
    Call a script function

  • CallPrivateScriptFunction <String>
    Calls a script function from this entity's private script scope.

  • CallGlobalScriptFunction <String>
    Calls a script function in the global script scope.

  • Kill <Void>
    Removes this entity from the world.

  • KillHierarchy <Void>
    Removes this entity and all its children from the world.

  • KillConstrained <Void>
    Removes this entity, all its children, and anything constrained to it, from the world.

  • AddOutput <String>
    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 <Void>
    Causes this entity's OnUser1 output to be fired.

  • FireUser2 <Void>
    Causes this entity's OnUser2 output to be fired.

  • FireUser3 <Void>
    Causes this entity's OnUser3 output to be fired.

  • FireUser4 <Void>
    Causes this entity's OnUser4 output to be fired.

Outputs

  • OnMinCountAll <Void>
    Fired when the count of all npcs transitions to the min count or less.

  • OnMaxCountAll <Void>
    Fired when the count of all npcs transitions to the max count or greater.

  • OnRangeFactorAll <Float>
    Outputs the factor of the count of all npcs.

  • OnMinPlayerDistAll <Float>
    Outputs distance to the NPC, of all NPCs, that is closest to player.

  • OnMinCount1 <Void>
    Fired when the count of npc 1 transitions to the min count or less.

  • OnMaxCount1 <Void>
    Fired when the count of npc 1 transitions to the max count or greater.

  • OnRangeFactor1 <Float>
    Outputs the factor of the count of npc 1.

  • OnMinPlayerDist1 <Float>
    Outputs distance to the NPC, of NPCs 1, that is closest to player.

  • OnMinCount2 <Void>
    Fired when the count of npc 2 transitions to the min count or less.

  • OnMaxCount2 <Void>
    Fired when the count of npc 2 transitions to the max count or greater.

  • OnRangeFactor2 <Float>
    Outputs the factor of the count of npc 2.

  • OnMinPlayerDist2 <Float>
    Outputs distance to the NPC, of NPCs 2, that is closest to player.

  • OnMinCount3 <Void>
    Fired when the count of npc 3 transitions to the min count or less.

  • OnMaxCount3 <Void>
    Fired when the count of npc 3 transitions to the max count or greater.

  • OnRangeFactor3 <Float>
    Outputs the factor of the count of npc 3.

  • OnMinPlayerDist3 <Float>
    Outputs distance to the NPC, of NPCs 3, that is closest to player.

  • OnUser1 <Void>
    Fired in response to FireUser1 input.

  • OnUser2 <Void>
    Fired in response to FireUser2 input.

  • OnUser3 <Void>
    Fired in response to FireUser3 input.

  • OnUser4 <Void>
    Fired in response to FireUser4 input.

  • OnKilled <Void>
    Fired when the entity is killed and removed from the game. Parameter is the inflictor.