Ai ally manager: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Cleanup)
Line 10: Line 10:


==Keyvalues==
==Keyvalues==
{{KV Targetname}}


*{{KV Targetname}}
{{KV|Maximum number of allies|int|Maximum number of allies.}}


*'''maxallies'''
{{KV|Maximum number of medics|int|Maximum number of allies that are medics.}}
:<integer> Maximum number of allies.
 
*'''maxmedics'''
:<integer> Maximum number of allies that are medics.


==Inputs==
==Inputs==
{{I Targetname}}


*{{I Targetname}}
{{IO|SetMaxAllies|Set maximum number of allies.|param=int}}


*'''SetMaxAllies <integer>'''
{{IO|SetMaxMedics|Set maximum number of medic allies.|param=int}}
:Set maximum number of allies


*'''SetMaxMedics <integer>'''
{{IO|Replenish|Replenish player allies.}}
:Set maximum number of medic allies
 
*'''Replenish'''
:Replenish player allies


==Outputs==
==Outputs==
*{{O Targetname}}
{{O Targetname}}
 
*'''SpawnMedicAlly'''
:Fires to spawn a Medic Ally
 
*'''SpawnAlly0'''
:Fires to spawn Ally 0
 
*'''SpawnAlly1'''
:Fires to spawn Ally 1
 
*'''SpawnAlly2'''
:Fires to spawn Ally 2
 
*'''SpawnAlly3'''
:Fires to spawn Ally 3
 
*'''SpawnAlly4'''
:Fires to spawn Ally 4
 
*'''SpawnAlly5'''
:Fires to spawn Ally 5
 
*'''SpawnAlly6'''
:Fires to spawn Ally 6
 
*'''SpawnAlly7'''
:Fires to spawn Ally 7


*'''SpawnAlly8'''
{{IO|SpawnMedicAlly|Fires to spawn a Medic Ally.}}
:Fires to spawn Ally 8


*'''SpawnAlly9'''
{{IO|SpawnAlly ''0-9''|Fires to spawn Allies ''0-9''.}}
:Fires to spawn Ally 9


*'''OnZeroAllies'''
{{IO|OnZeroAllies|Fires when there are no more allies.}}
:Fires when there are no more allies


*'''OnZeroMedicAllies'''
{{IO|OnZeroMedicAllies|Fires when there are no more medics left.}}
:Fires when there are no more medics left


[[Category:AI]]
[[Category:AI]]

Revision as of 07:09, 4 February 2012

Template:Hl2 point

Entity description

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.

  • Outputs can be used for purposes aside from spawning more NPCs, if you're so inclined
  • More than one ai_ally_manager can exist
  • Won't count more than ten (10) allies

Keyvalues

Name (targetname) <string>[ Edit ]
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 ([todo internal name (i)]) <integer>
Maximum number of allies.


Maximum number of medics ([todo internal name (i)]) <integer>
Maximum number of allies that are medics.

Inputs

SetMaxAllies <integerRedirectInput/integer>
Set maximum number of allies.


SetMaxMedics <integerRedirectInput/integer>
Set maximum number of medic allies.


Replenish
Replenish player allies.

Outputs

SpawnMedicAlly
Fires to spawn a Medic Ally.


SpawnAlly 0-9
Fires to spawn Allies 0-9.


OnZeroAllies
Fires when there are no more allies.


OnZeroMedicAllies
Fires when there are no more medics left.