ai_ally_manager

From Valve Developer Community
(Redirected from Ai ally manager debug)
Jump to navigation Jump to search
Class hierarchy
CAI_AllyManager
CBaseEntity
ai_allymanager.cpp
Ai ally manager.png

ai_ally_manager is a point entity available in Half-Life 2 series Half-Life 2 series. It monitors the number and type of npc_citizen allies and responds accordingly. When this entity receives a Replenish input, it will count the number of allies and send outputs based on how many allies are needed to match this entity's keyvalues. Also fires an output when all allies and/or all medics are dead.

Note.pngNote:
  • Outputs can be used for purposes aside from spawning more NPCs.
  • More than one ai_ally_manager can exist.
  • Won't count more than 10 allies.
Note.pngNote:This entity is also in the code for Portal. Its functionality is not guaranteed.


ConVars/Commands

Cvar/CommandParameters or default valueDescriptorEffect
ai_ally_manager_debug00 disables, 1 enablesPeriodically prints the count of allies and medics to the console. Requires developer 1.

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 number of allies (maxallies) <integer>
Maximum number of allies.
Maximum number of medics (maxmedics) <integer>
Maximum number of allies that are medics.

Inputs

SetMaxAllies <integer>
Set maximum number of allies.
SetMaxMedics <integer>
Set maximum number of medic allies.
Replenish
Spawn more allies as requested by the keyvalues.

Outputs

OnZeroAllies
Fired when there are no more allies.
OnZeroMedicAllies
Fired when there are no more medics left.
SpawnAlly0 to SpawnAlly9
Fired when allies 0 to 9 spawn.
SpawnMedicAlly
Fired when a medic ally spawns.