Ai ally manager: Difference between revisions
Jump to navigation
Jump to search

(slightly shifting my entity-updating process. urgh.) |
(.) |
||
Line 6: | Line 6: | ||
*More than one <code>ai_ally_manager</code> can exist. | *More than one <code>ai_ally_manager</code> can exist. | ||
*Won't count more than 10 allies. | *Won't count more than 10 allies. | ||
{{stray ent|{{portal}}}} | |||
{{code class|CAI_AllyManager|ai_allymanager.cpp}} | {{code class|CAI_AllyManager|ai_allymanager.cpp}} | ||
==ConVars/Commands== | ==ConVars/Commands== |
Revision as of 19:53, 12 September 2018


Template:Hl2 point 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.
Notes:
- 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.
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
- Maximum number of medics (maxmedics) ([todo internal name (i)]) <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.