Ai goal assault: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added tip to begin assault)
Line 35: Line 35:


{{KV|Rally Point Selection Method|choices|Select the Rally Point Selection Method.}}
{{KV|Rally Point Selection Method|choices|Select the Rally Point Selection Method.}}
:{| class=standard-table
*'''0''': Priority number assigned to each assault_rallypoint. If there are multiple tied for priority, go to the closest one.
! Literal Value || Description
*'''1''': Choose randomly
|-
| 0 || Priority, Distance (default)
|-
| 1 || Random
|}


<!--This entity doesn't have any flags.-->
<!--This entity doesn't have any flags.-->

Revision as of 00:35, 21 May 2018

Template:Hl2 point

Entity description

This entity specifies which NPCs are to carry out an assault, and triggers it when any conditions given are met. One goal can handle multiple rally points. Must be active to be able to be triggered.

Upon activation, the entity will round up all its actors (specified in its actors keyvalue), and instruct them to select their assault_rallypoint(s) and move to it/them. Upon arrival at the rally point(s), each actor then begins waiting for the assault cue (specified in the AssaultCue keyvalue), unless instructed Don't wait for a cue..

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.

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


Actor(s) to affect ([todo internal name (i)]) <target_name_or_class>
NPCs that should perform this assault. This field supports wildcards, if they are needed.
Note.pngNote:Each NPC needs its own rally point, so if you use wildcards for this field, you should also use wildcards for the rallypoint.


Rally Point Set ([todo internal name (i)]) <targetname>
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.


Search Type ([todo internal name (i)]) <choices>
How to search for the entities using the name specified in the actorname keyvalue. The Entity Name choice will make the engine search for a targetname of an entity, while the Classname choice will make it search for the name of an entity class (like npc_headcrab).
  • 0 : Entity Name
  • 1 : Classname


Start Active ([todo internal name (i)]) <boolean>
Should this goal be active when the map begins?


Assault Cue ([todo internal name (i)]) <choices>
Chooses when the goal is going to be set after this entity has been activated.
Literal Value Description Cue...
1 Entity System Input After it has received a BeginAssault input through the I/O system.
2 Gunfire When the entity 'hears' gunfire.
3 Don't wait for a cue. Immediately after being activated.


Rally Point Selection Method ([todo internal name (i)]) <choices>
Select the Rally Point Selection Method.
  • 0: Priority number assigned to each assault_rallypoint. If there are multiple tied for priority, go to the closest one.
  • 1: Choose randomly


Inputs

Activate
If the entity is not yet active, this input will activate it.


Deactivate
Deactivates the assault. NPCs are released from the assault behaviour and control is relinquished back to the standard AI/other triggers, as desired by the level designer.


BeginAssault
IIf the entity is active and this entity's Assault Cue keyvalue is set to Entity System Input, begin the assault(s).
Tip.pngTip:This will cause NPCs to "skip over" the rally point if they aren't there already. Useful for using rally points for selecting actors.

Outputs

See also