Assault rallypoint: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (removed {{DISPLAYTITLE}}, covered by the hl2 point template)
(updates)
Line 1: Line 1:
{{hl2 point|assault_rallypoint}}  
{{lang|Assault rallypoint}}
[[File:Assault rallypoint.png|left]]{{hl2 point|assault_rallypoint}} It specifies a point used to rally [[NPC]]s for [[assault]] behavior. Used with either an {{ent|ai_goal_assault}} or the <code>Assault</code>input available on some NPCs. All assaults begin at an <code>assault_rallypoint</code>. NPCs move to these points when cued for an assault, optionally waiting here, before commencing the assault by heading to an {{ent|assault_assaultpoint}}.


==Entity description==
{{code class|CRallyPoint|ai_behavior_assault.cpp}}
[[Image:Assault rallypoint.png|left]]It specifies a point used to rally [[NPC]]s for [[Assaults|assault]] behaviour. Used with either an [[ai_goal_assault]] or the [[#Inputs|Assault input]]. All assaults begin at an '''assault_rallypoint'''. NPCs move to these points when cued for an assault, optionally waiting here, before commencing the assault by heading to an [[assault_assaultpoint]]. {{clr}}


===Limitations and bugs===
==Limitations and bugs==
 
*A rallypoint can only serve one NPC per assault. If multiple NPCs are required to assault at the same time, each needs their own rallypoint. There may be a solution to this but it is not yet documented. Use of wildcards can make the assignment of individual NPCs to individual rallypoints easier.
* A rallypoint can only serve one NPC per assault. If multiple NPCs are required to assault at the same time, each needs their own rallypoint. There may be a solution to this but it is not yet documented. Use of wildcards can make the assignment of individual NPCs to individual rallypoints easier.
*NPCs will always turn to face in the direction the entity is set to when arriving at a rally point. This is might look unnatural in some cases.
* NPCs will always turn to face in the direction the entity is set to when arriving at a rally point. This is might look unnatural in some cases.


==Keyvalues==
==Keyvalues==
 
{{KV|Priority (priority)|int|How appealing the rallypoint will be. When an NPC receives the <code>Assault</code> input, it will select a suitable rallypoint from those available to it, preferring the one with the highest '''Priority''' value. If the '''Priority''' is the same between any rallypoints, the closest one will be chosen.}}
{{KV|Priority|int|How appealing the rallypoint will be. When an NPC receives the ''Assault'' input, it will select a suitable rallypoint from those available to it, prefering the one with the highest ''priority'' value.{{note|Priority '''always''' trumps distance.}}}}
{{KV|Assault Point (assaultpoint)|targetname|The first {{ent|assault_assaultpoint}} in the chain to move to as the assault begins.}}
 
{{KV|Assault Delay (assaultdelay)|float|The amount of time to wait here once the assault cue has been given, before moving to the first {{ent|assault_assaultpoint}}.}}
{{KV|Assault Point|targetname|The first [[assault_assaultpoint]] in the chain to move to as the assault begins.}}
{{KV|Rally Sequence (rallysequence)|string|Set a specific animation sequence for NPCs waiting to begin the assault, overriding the wait activity of the NPC.}}
 
{{KV|Force Crouch (forcecrouch)|bool|NPCs using this assault point are forced into crouching while holding it.}}
{{KV|Assault Delay|float|The amount of time to wait here once the assault cue has been given, before moving to the first [[assault_assaultpoint]].}}
{{KV|Urgent (urgent)|bool|If set, NPCs will consider movement to this rally point as Urgent Navigation (ignoring prop_physics blockers, eventually teleporting).}}
 
{{KV BaseEntity|base=1}}
{{KV|Rally Sequence|string|Set a specific animation sequence for NPCs waiting to begin the assault, overriding the wait activity of the NPC.}}
 
{{KV|Force Crouch|bool|NPCs using this assault point are forced into crouching while holding it.}}
 
{{KV|Urgent|bool|If set, NPCs will consider movement to this rally point as Urgent Navigation (ignoring prop_physics blockers, eventually teleporting).}}
 
{{KV Angles}}
 
{{KV Parentname}}
 
{{KV Targetname}}


==Inputs==
==Inputs==
{{I Targetname}}
{{I BaseEntity|base=1}}
 
{{I Parentname}}


==Outputs==
==Outputs==
{{O Targetname}}
{{IO|OnArrival|Fires when the NPC arrives.}}
 
{{O BaseEntity}}
{{IO|OnArrival|Fires when the NPC arrives {{activator|NPC}}}}.
 
==See also==
* [[Assaults]] - Article about Assaults.


[[Category:AI]]
[[Category:AI]]
[[Category:Entities]]

Revision as of 19:01, 4 September 2018

English (en)Translate (Translate)
Assault rallypoint.png

Template:Hl2 point It specifies a point used to rally NPCs for assault behavior. Used with either an ai_goal_assault or the Assaultinput available on some NPCs. All assaults begin at an assault_rallypoint. NPCs move to these points when cued for an assault, optionally waiting here, before commencing the assault by heading to an assault_assaultpoint.

C++ In code, it is represented by theCRallyPointclass, defined in theai_behavior_assault.cppfile.

Limitations and bugs

  • A rallypoint can only serve one NPC per assault. If multiple NPCs are required to assault at the same time, each needs their own rallypoint. There may be a solution to this but it is not yet documented. Use of wildcards can make the assignment of individual NPCs to individual rallypoints easier.
  • NPCs will always turn to face in the direction the entity is set to when arriving at a rally point. This is might look unnatural in some cases.

Keyvalues

Priority (priority) ([todo internal name (i)]) <integer>
How appealing the rallypoint will be. When an NPC receives the Assault input, it will select a suitable rallypoint from those available to it, preferring the one with the highest Priority value. If the Priority is the same between any rallypoints, the closest one will be chosen.
Assault Point (assaultpoint) ([todo internal name (i)]) <targetname>
The first assault_assaultpoint in the chain to move to as the assault begins.
Assault Delay (assaultdelay) ([todo internal name (i)]) <float>
The amount of time to wait here once the assault cue has been given, before moving to the first assault_assaultpoint.
Rally Sequence (rallysequence) ([todo internal name (i)]) <string>
Set a specific animation sequence for NPCs waiting to begin the assault, overriding the wait activity of the NPC.
Force Crouch (forcecrouch) ([todo internal name (i)]) <boolean>
NPCs using this assault point are forced into crouching while holding it.
Urgent (urgent) ([todo internal name (i)]) <boolean>
If set, NPCs will consider movement to this rally point as Urgent Navigation (ignoring prop_physics blockers, eventually teleporting).


Inputs

Outputs

OnArrival
Fires when the NPC arrives.