Ai goal standoff
Jump to navigation
Jump to search


Template:Base point 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
- Aggressiveness (Aggressiveness) ([todo internal name (i)]) <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) ([todo internal name (i)]) <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) ([todo internal name (i)]) <boolean>
- Friendly NPCs will use the player as a battle line.
- Stay at cover location (StayAtCover) ([todo internal name (i)]) <boolean>
- If current cover is suitable, don't advance.
- Abandon if enemies hide (AbandonIfEnemyHides) ([todo internal name (i)]) <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) ([todo internal name (i)]) <boolean>
- When reloading, NPCs will take cover.
- Min time wait to shoot (CustomMinTimeShots) ([todo internal name (i)]) <float>
- Minimum time between bursts of shots.
- Max time wait to shoot (CustomMaxTimeShots) ([todo internal name (i)]) <float>
- Maximum time between bursts of shots.
- Min shots in a burst (CustomMinShots) ([todo internal name (i)]) <integer>
- Minimum number of bullets in a burst of shots.
- Max shots in a burst (CustomMaxShots) ([todo internal name (i)]) <integer>
- Maximum number of bullets in a burst of shots.
- Odds cover on damage (CustomOddsCover) ([todo internal name (i)]) <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]