ai_ally_manager
Class hierarchy |
---|
CAI_AllyManager |
ai_allymanager.cpp
|
ai_ally_manager
is a point entity available in 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:
- 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.
Contents
ConVars/Commands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
ai_ally_manager_debug | 0 | 0 disables, 1 enables | Periodically 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
ortarget
).
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
toSpawnAlly9
- Fired when allies 0 to 9 spawn.
SpawnMedicAlly
- Fired when a medic ally spawns.