This article's documentation is for anything that uses the Source engine. Click here for more information.

Ai battle line: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(34 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{wrongtitle|title=ai_battle_line}}
{{LanguageBar}}
{{This is a|point entity|name=ai_battle_line|except=Left 4 Dead series}}
{{CD|CAI_BattleLine|file1=ai_behavior_standoff.cpp}}
[[File:Standoff diagram.png|frame|right]]
Battle lines are a part of the Standoff [[:Category:AI|AI]] schedule. They instruct [[NPC]]s to try and stay behind it to a configurable degree. See [[Standoffs]] for more information about the use of <code>ai_battle_line</code>.


==Structure==
==ConVars/Commands==
<center>[[Image:Standoff_diagram.png]]</center>
{{varcom|start}}
{{varcom|ai_drawbattlelines|0|01|When NPCs move to new positions, show any ground considered to be gained or lost.}}
{{varcom|end}}


NPCs follow the rules of engagement given them by an ai_goal_standoff. In addition, they will always stay behind any ai_battle_lines that apply to them. There is one standoff and any number of battle lines per force.
==Flags==
See [[Standoffs]] for more information.
{{fl|1|Use [[parent]]'s orientation}}
 
==Entity Description==
 
Battle line


==Keyvalues==
==Keyvalues==
 
{{KV Targetname}}
* {{kv targetname}}
{{KV|Actor|intn=actor|target_name_or_class|Actor(s) or squad to affect.}}
<!-- Source found at [[Template:KV Targetname]] -->
{{KV|Active|intn=Active|bool|Self-explanatory.}}
 
{{KV|Strict|intn=Strict|bool|If true, players will not be able to order their allies to ignore the battle line by commanding them with {{cmd|impulse|50}} (bound to {{key|C}} by default).}}
* {{kv angles}}
<!-- Source found at [[Template:KV Angles]] -->
 
* {{kv parentname}}
<!-- Source found at [[Template:KV Parentname]] -->
 
* '''actor'''
: <target_name_or_class> Actor(s) or squad to affect
 
* '''Active'''
: <choices> Active
 
* '''Strict'''
: <choices> Player orders can override, applies to allies only
 
 
==Flags==
 
* Use parent's orientation
 


==Inputs==
==Inputs==
{{I|Activate|If the entity is not yet active, this input will activate it.}}
{{I|Deactivate|If the entity is not yet inactive, this input will turn it inactive.}}


* '''Kill'''
[[Category:AI]]
: Removes this entity from the world.
 
* '''KillHierarchy'''
: Removes this entity and all its children from the world.
 
* '''AddOutput <string>'''
: Adds an entity I/O connection to this entity. Format: <output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>. Very dangerous, use with care.
 
* '''FireUser''1-4'''''
: Causes this entity's OnUser1-4 outputs to be fired. See [[User Inputs and Outputs]].
 
* {{i parentname}}
 
* '''Activate'''
 
* '''Deactivate'''
 
 
==Outputs==
 
*{{o targetname}}
 
==See Also==
 
* [[Standoffs]]
 
 
[[Category:Entities]]

Latest revision as of 03:08, 4 April 2025

English (en)Translate (Translate)

ai_battle_line is a point entity available in all Source Source games except Left 4 Dead seriesLeft 4 Dead series Left 4 Dead series.

C++ Class hierarchy
CAI_BattleLine
CBaseEntity
C++ ai_behavior_standoff.cpp
Standoff diagram.png

Battle lines are a part of the Standoff AI schedule. They instruct NPCs to try and stay behind it to a configurable degree. See Standoffs for more information about the use of ai_battle_line.

ConVars/Commands

Cvar/Command Parameters or default value Descriptor Effect
ai_drawbattlelines 0 0 disables, 1 enables When NPCs move to new positions, show any ground considered to be gained or lost.

Flags

Use parent's orientation : [1]

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 (actor) <target_name_or_class>
Actor(s) or squad to affect.
Active (Active) <boolean>
Self-explanatory.
Strict (Strict) <boolean>
If true, players will not be able to order their allies to ignore the battle line by commanding them with impulse 50 (bound to C by default).

Inputs

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