ai_goal_assault

From Source Entities
(Redirected from Ai debug assault)
Jump to navigation Jump to search

Code classes:

ai_goal_assault is a point entity present in all games except the L4d.pngL4d2-small.pngLeft 4 Dead games. This entity specifies which NPCs are to carry out an assault, and triggers it when any conditions given are met. Must be active to be able to be triggered.

Upon activation, the entity will round up all its actors (specified in a keyvalue), and instruct them to select their assault_rallypoint(s) and move to it/them. Upon arrival at the rally point(s), the acts then begin waiting for an Assault Cue, unless instructed to assault immediately. One goal entity can handle multiple rally points.

Upon the cue, it will then instruct all actors to begin moving on from their current rally point to the assault_assaultpoint specified by the rally point.

Note: Oddly, these don't seem to work in Asw.png...

ConVars/Commands[edit | edit source]

ConVar/CommandParameters or default valueParameter TypeEffect
ai_debug_assault00 disables, 1 enablesDraws lines from each NPC to their target rallypoint or assaultpoint.

Keyvalues[edit | edit source]

Rally Point Set (rallypoint) <target_destination>
The name of the assault_rallypoint(s) at which this assault will begin. This field can also support wildcards, so that you can enter the root name of all rally points for this assault followed by an asterisk '*', to match all with the same root.
Note: Each NPC needs its own rally point. You can still probably get away with naming all your rally points the same thing.
Assault Cue (AssaultCue) <choices>
Chooses when the goal is going to be set after this entity has been activated.
  • 1: Entity System Input (BeginAssault)
  • 2: Gunfire (When the entity 'hears' gunfire To do: Works? Tested with player weapons and ai_sound, no results.)
  • 3: Don't wait for a cue. (Attack immediately after rallying finishes)
Rally Point Selection Method (RallySelectMethod) <choices>
How NPCs will decide which rallypoint to move to.
  • 0: Choose by priority. If there are multiple tied for priority, go to the closest one.
  • 1: Choose randomly
  • 2: If priority is tied, go to the point farthest away. (Not in FGD) (available in all games since Asw.png)
Branching Assault Selection Method (Not in FGD) (BranchMethod) <choices> (available in all games since Asw.png)
If assault points go in a branching path, set how they decide which one to go for. (Despite being added in Alien Swarm, this was only included in the FGD for Portal 2.)
  • 0: Random (default)
  • 1: Closest
  • 2: Furthest

Inputs[edit | edit source]

BeginAssault
If the entity is active and this entity's Assault Cue keyvalue is set to Entity System Input, begin the assault. This will cause NPCs to "skip over" the rally point if they aren't there already.