ai_goal_standoff

From Source Entities
Jump to navigation Jump to search

Code classes:

Ai goal standoff.png

ai_goal_standoff is a point entity present in all games except the L4d.pngL4d2-small.pngLeft 4 Dead games. 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[edit | edit source]

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 (Not in 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 needed.
  • 2: Move immediately - Move to a different position (if we want to) as soon as the change occurs.
Player battleline (PlayerBattleline) <boolean>
Should friendly NPCs use the player as a battle line?
Stay at cover location (StayAtCover) <boolean>
If current cover is suitable, should NPCs stay there and not advance?
Abandon if enemies hide (AbandonIfEnemyHides) <boolean>
If NPCs haven't seen enemies for a set amount of time (Enemy hides abandon time), consider the standoff to be over?

Custom Aggressiveness[edit | edit source]

These keyvalues are hidden from the FGD, but according to code they work fine. These keyvalues can be re-shown by removing the comment markers (//) from the FGD.

Take cover to reload (CustomCoverOnReload) <boolean>
When reloading, should NPCs 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.

Inputs[edit | edit source]

SetAggressiveness <integer>
Changes the value of Aggressiveness.