ai_goal_standoff
Class hierarchy |
---|
CAI_StandoffGoal |
ai_behavior_standoff.cpp
|
ai_goal_standoff
is a point entity available in all Source games except Left 4 Dead series.
This entity enables NPCs to take part in standoffs - they will attack more tactically, take cover frequently, and possibly wait for the player to lead forward.
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
- Aggressiveness
(Aggressiveness)
<choices> - How aggressive will NPCs behave? Generally, higher aggression means more risk-taking and attacking for longer periods of time.
Literal value Description Take cover to reload Min time wait to shoot Max time wait to shoot Min shots in a burst Max shots in a burst Odds cover on damage Enemy hides abandon time 0 Very Low Yes 4 8 2 4 50/100 30 1 Low Yes 2 5 3 5 25/100 20 2 Medium Yes 0.6 2.5 3 6 25/100 10 3 High Yes 0.2 1.5 5 8 10/100 10 4 Very High No 0 0 100 100 0/100 5 5 !FGD Custom/Default Yes 1.5 2.5 1 3 25/100 0
- Reaction to tactical change
(HintGroupChangeReaction)
<choices> - Defines how biased NPCs should be to finding cover when the status of the standoff changes. The ways the status can change include the battle line/player moving, NPCs dying, hint group changes, and the
SetAggressiveness
input.- 0: Move when ready (default AI) - Act as normal.
- 1: Move when seek cover - Move when cover is necessary.
- 2: Move immediately - Move to a different position always.
- Player battleline
(PlayerBattleline)
<boolean> - Friendly NPCs will use the player as a battle line.
- Stay at cover location
(StayAtCover)
<boolean> - If current cover is suitable, don't advance.
- Abandon if enemies hide
(AbandonIfEnemyHides)
<boolean> - If NPCs have seen no enemies for a set amount of time, they'll consider the standoff to be over.
Custom Aggressiveness
The FGD says these keyvalues are disabled in code, but that is not true (in fact, Valve uses them). These will override the numbers in the Custom/Default row in the table above.
- Take cover to reload
(CustomCoverOnReload)
<boolean> - When reloading, NPCs will take cover.
- Min time wait to shoot
(CustomMinTimeShots)
<float> - Minimum time between bursts of shots.
- Max time wait to shoot
(CustomMaxTimeShots)
<float> - Maximum time between bursts of shots.
- Min shots in a burst
(CustomMinShots)
<integer> - Minimum number of bullets in a burst of shots.
- Max shots in a burst
(CustomMaxShots)
<integer> - Maximum number of bullets in a burst of shots.
- Odds cover on damage
(CustomOddsCover)
<integer> - When an NPC is damaged, this is the percent of the time in which they will immediately take cover.
AI_GoalEntity:
- Actor(s) to affect
(actor)
<target_name_or_class> - The targetname or classname of any NPCs that will be included in this goal. Wildcards are supported.
- Search Type
(SearchType)
<choices> - What the Actor(s) to affect keyvalue targets by.
- 0: Entity Name
- 1: Classname
- Start Active
(StartActive)
<boolean> - Set if goal should be active immediately.
Inputs
SetAggressiveness
<integer>- Changes the value of Aggressiveness.
AI_GoalEntity:
Activate
- Make the goal active if it wasn't already. NPCs will begin taking orders.
Deactivate
- Make goal inactive.
UpdateActors
!FGD- Tell the goal entity to re-check Actor(s) to affect in case any disappeared, or any new NPCs spawned.[confirm]