Assault: Difference between revisions
(Removed the "Limitations and bugs" section, that has been moved to the entities it concerns.) |
(New section: Major options overview (nowt wrong with duplicate info now this is just a tutorial page, imo)) |
||
Line 13: | Line 13: | ||
==Structure== | ==Structure== | ||
An assault consists of a an AI goal (the [[ai_goal_assault]] entity) gathering a set of one or more NPCs (called ''actor(s)'') to one or more "rally point" locations ([[assault_rallypoint]] entities) where they will normally await a cue to commence the assault. On this cue, they will proceed to the first "assault point" location ([[assault_assaultpoint]] entity) to secure, or 'clear' | An assault consists of a an AI goal (the [[ai_goal_assault]] entity) gathering a set of one or more NPCs (called ''actor(s)'') to one or more "rally point" locations ([[assault_rallypoint]] entities) where they will normally await a cue to commence the assault. On this cue, they will proceed to the first "assault point" location ([[assault_assaultpoint]] entity) to secure, or 'clear' it, and then proceed on to the next assault point (if any), clear it, and then proceed to the next, and so on. | ||
Clearing an assault point, by default, consists of standing on its location and ensuring that there are no hostiles in sight for the timeout period, but this is completely configurable. | Clearing an assault point, by default, consists of standing on its location and ensuring that there are no hostiles in sight for the timeout period, but this is completely configurable. | ||
Line 22: | Line 22: | ||
# When activated, an '''ai_goal_assault''' entity can send its ''actor(s)'' to the associated ''assault_rallypoint(s)'', where they wait for the assault cue. This is the most common usage. The ''ai_goal_assault'' entity can either be activated by an ''Activate'' input, or set to start active through its ''Start Active'' keyvalue, which causes the assault to begin as soon as the map is loaded. | # When activated, an '''ai_goal_assault''' entity can send its ''actor(s)'' to the associated ''assault_rallypoint(s)'', where they wait for the assault cue. This is the most common usage. The ''ai_goal_assault'' entity can either be activated by an ''Activate'' input, or set to start active through its ''Start Active'' keyvalue, which causes the assault to begin as soon as the map is loaded. | ||
# [[npc_combine_s|Combine soldiers]] may be instantly associated with a rally point without the use of an ''ai_goal_assault'' entity. Using the entity [[Inputs and Outputs|I/O system]], you can fire the '''Assault''' input on the soldier, providing the name of the ''assault_rallypoint'' as an input parameter. When a Combine soldier receives this input, it will search for the specified [[assault_rallypoint]] entity, move to it, and then proceed immediately to the associated ''assault_assaultpoint''. Please note that although the ''Assault'' input can be sent to any NPC ''it is only ''supported'' for Combine soldiers''. You may use wildcards when specifying the rally point in the parameter. You may also use the ''priority'' keyvalue of an ''assault_rallypoint'' entity as a parameter to influence this decision, if providing a wildcard which specifies more than one ''assault_rallypoint'' entity. | # [[npc_combine_s|Combine soldiers]] may be instantly associated with a rally point without the use of an ''ai_goal_assault'' entity. Using the entity [[Inputs and Outputs|I/O system]], you can fire the '''Assault''' input on the soldier, providing the name of the ''assault_rallypoint'' as an input parameter. When a Combine soldier receives this input, it will search for the specified [[assault_rallypoint]] entity, move to it, and then proceed immediately to the associated ''assault_assaultpoint''. Please note that although the ''Assault'' input can be sent to any NPC ''it is only ''supported'' for Combine soldiers''. You may use wildcards when specifying the rally point in the parameter. You may also use the ''priority'' keyvalue of an ''assault_rallypoint'' entity as a parameter to influence this decision, if providing a wildcard which specifies more than one ''assault_rallypoint'' entity. | ||
==Major options== | |||
The assault behaviour offers a flexible degree of customisation among the entities that make up an assault. This list's purpose is to provide an overview of the major options (beyond entity placement). Consult each entity's individual page for more detailed information. | |||
* '''ai_goal_assault''': | |||
:Keyvalue '''AssaultCue''': Determines what will cause the NPC to move off their rally point and begin the assault. | |||
* '''assault_rallypoint''': | |||
:Keyvalue '''priority''': Determines how appealing the rally point will be to an NPC when it has multiple rally points to choose between. | |||
:Keyvalue '''assaultdelay''': Time to wait at rally point after assault cue, before beginning assault. | |||
* '''assault_assaultpoint''': | |||
:Keyvalue '''assaultgroup''': Constrain an NPC's hint node use to this hint group. | |||
:Keyvalue '''assaulttimeout''', '''nevertimeout''': How long to wait without seeing enemies before considering the point cleared. | |||
:Keyvalue '''clearoncontact''': Whether to clear assault point if the NPC encounters enemies while moving to it. | |||
:Keyvalue '''allowdiversion''': Whether the NPC should move to engage enemies it encounters or ignore them and follow the assault points. | |||
:Spawnflag '''1''': Clear point upon arrival, unconditionally. | |||
==Example== | ==Example== |
Revision as of 11:07, 10 April 2006
The purpose of an assault is to make one or more NPC(s) tactically advance along a predesigned route, securing tactical points along the way. It is much more flexible than a path_corner entity.
An assault consists of two or three component entities:
- ai_goal_assault (1 per assault, optional)
- assault_rallypoint (1 per NPC)
- assault_assaultpoint (any number)
This article will show you the overall picture on how to set up an assault. (For entity specific information, see the related entity.)
Structure
An assault consists of a an AI goal (the ai_goal_assault entity) gathering a set of one or more NPCs (called actor(s)) to one or more "rally point" locations (assault_rallypoint entities) where they will normally await a cue to commence the assault. On this cue, they will proceed to the first "assault point" location (assault_assaultpoint entity) to secure, or 'clear' it, and then proceed on to the next assault point (if any), clear it, and then proceed to the next, and so on. Clearing an assault point, by default, consists of standing on its location and ensuring that there are no hostiles in sight for the timeout period, but this is completely configurable.

Assaults can be triggered in one of two ways:
- When activated, an ai_goal_assault entity can send its actor(s) to the associated assault_rallypoint(s), where they wait for the assault cue. This is the most common usage. The ai_goal_assault entity can either be activated by an Activate input, or set to start active through its Start Active keyvalue, which causes the assault to begin as soon as the map is loaded.
- Combine soldiers may be instantly associated with a rally point without the use of an ai_goal_assault entity. Using the entity I/O system, you can fire the Assault input on the soldier, providing the name of the assault_rallypoint as an input parameter. When a Combine soldier receives this input, it will search for the specified assault_rallypoint entity, move to it, and then proceed immediately to the associated assault_assaultpoint. Please note that although the Assault input can be sent to any NPC it is only supported for Combine soldiers. You may use wildcards when specifying the rally point in the parameter. You may also use the priority keyvalue of an assault_rallypoint entity as a parameter to influence this decision, if providing a wildcard which specifies more than one assault_rallypoint entity.
Major options
The assault behaviour offers a flexible degree of customisation among the entities that make up an assault. This list's purpose is to provide an overview of the major options (beyond entity placement). Consult each entity's individual page for more detailed information.
- ai_goal_assault:
- Keyvalue AssaultCue: Determines what will cause the NPC to move off their rally point and begin the assault.
- assault_rallypoint:
- Keyvalue priority: Determines how appealing the rally point will be to an NPC when it has multiple rally points to choose between.
- Keyvalue assaultdelay: Time to wait at rally point after assault cue, before beginning assault.
- assault_assaultpoint:
- Keyvalue assaultgroup: Constrain an NPC's hint node use to this hint group.
- Keyvalue assaulttimeout, nevertimeout: How long to wait without seeing enemies before considering the point cleared.
- Keyvalue clearoncontact: Whether to clear assault point if the NPC encounters enemies while moving to it.
- Keyvalue allowdiversion: Whether the NPC should move to engage enemies it encounters or ignore them and follow the assault points.
- Spawnflag 1: Clear point upon arrival, unconditionally.
Example
This example map contains a single NPC on a linear chain using all the major options available to designers when moving NPCs from assaultpoint to assaultpoint. There are four points, and each is configured differently:
- Clear on contact with enemies is enabled. When the NPC sees the hostiles, it clears out the assaultpoint and continues to 2.
- Clear this point on arrival, UNCONDITIONALLY is flagged. When the NPC reaches this point it clears it regardless of the fact that there are still hostiles in sight and begins to move towards 3.
- Allow diversion is set to No. The NPC will charge towards the assaultpoint without stopping or giving chase. It will however attack enemies in view.
- Allow diversion is set to Yes. The NPC will divert from moving to this point until there are no hostiles visible.
Note that the Metropolice cannot harm the NPC and will not attack the player in this example.