Ai script conditions: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added a description. Could someone who is familiar with all the various ent-page templates (I'm not, sorry), possibly give the formatting for this page a spring clean? Thanks!)
mNo edit summary
Line 17: Line 17:
:<target_destination> NPC Target
:<target_destination> NPC Target


Start Disabled StartDisabled <choices>
* '''StartDisabled'''
: {{boolean}}


Minimum state MinimumState <choices>  
* '''MinimumState'''
:<choices>
:{|
! Literal Value || Description
|-
| 1 || Idle
|-
| 2 || Alert
|-
| 3 || Combat
|}


Maximum state MaximumState <choices>  
* '''MaximumState'''
:<choices>
:{|
! Literal Value || Description
|-
| 1 || Idle
|-
| 2 || Alert
|-
| 3 || Combat
|}


Actor is running a script? ScriptStatus <choices>
* '''ScriptStatus'''
: {{boolean}} Actor is running a script?


Required Time RequiredTime <float> Duration of time that all the conditions must be true
* '''RequiredTime'''
: <float> Duration of time that all the conditions must be true


Minimum time out MinTimeout <float> Minimum time before OnConditionsTimeout is fired. 0 = never expire
* '''MinTimeout'''
: <float> Minimum time before OnConditionsTimeout is fired. 0 = never expire


Maximum time out MaxTimeout <float> Maximum time before OnConditionsTimeout is fired. 0 = ignore
* '''MaxTimeout'''
: <float> Maximum time before OnConditionsTimeout is fired. 0 = ignore


Actor Sees Player ActorSeePlayer <choices>
* '''ActorSeePlayer'''
: {{boolean}}


Player distance PlayerActorProximity <float> The distance the player must/must not be to the actor. Negative values for NOT, 0 for ignore.
* '''PlayerActorProximity'''
: <float> The distance the player must/must not be to the actor. Negative values for NOT, 0 for ignore.


Player FOV for Actor  PlayerActorFOV <float> Specify angle of view cone in degrees. Negative value = NOT
* '''PlayerActorFOV''
: <float> Specify angle of view cone in degrees. Negative value = NOT


Play FOV to Actor is a true view cone PlayerActorFOVTrueCone <choices> Player's view cone is evaluated as a true cone, not pie slice  
* '''PlayerActorFOVTrueCone'''
: <choices> Player's view cone is evaluated as a true cone, not pie slice  


Player has LOS to Actor PlayerActorLOS <choices> Checks that the player has clear Line of Sight to the Actor
* '''PlayerActorLOS'''
: {{boolean}} Checks that the player has clear Line of Sight to the Actor


Target (Optional) target <target_destination> Optional entity to include in conditions
* '''target'''
: <target_destination> Optional entity to include in conditions


Actor Sees Target ActorSeeTarget <choices>
* '''ActorSeeTarget'''
: {{boolean}}


Target distance ActorTargetProximity <float> The distance the actor must/must not be to the Target. Negative values for NOT, 0 for ignore.
* '''ActorTargetProximity'''
: <float> The distance the actor must/must not be to the Target. Negative values for NOT, 0 for ignore.


Player distance from Target PlayerTargetProximity <float> The distance the player must/must not be to the Target. Negative values for NOT, 0 for ignore.
* '''PlayerTargetProximity'''
: <float> The distance the player must/must not be to the Target. Negative values for NOT, 0 for ignore.


Player FOV for Target PlayerTargetFOV <float> Specify angle of view cone in degrees. Negative value = NOT
* '''PlayerTargetFOV'''
: <float> Specify angle of view cone in degrees. Negative value = NOT


Play FOV to Target is a true view cone PlayerTargetFOVTrueCone <choices> Player's view cone is evaluated as a true cone, not pie slice  
* '''PlayerTargetFOVTrueCone'''
 
: {{boolean}} Player's view cone is evaluated as a true cone, not pie slice  
Player has LOS to Target PlayerTargetLOS <choices> Checks that the player has clear Line of Sight to the Target
 
Player blocking Actor PlayerBlockingActor <choices> Checks that the player is blocking the Actor's path


* '''PlayerTargetLOS'''
: {{boolean}} Checks that the player has clear Line of Sight to the Target


* '''PlayerBlockingActor'''
: {{boolean}} Checks that the player is blocking the Actor's path


==Inputs==
==Inputs==
 
* {{i targetname}}
Kill Removes this entity from the world.
* {{i enabledisable}}
 
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.
 
FireUser1 Causes this entity's OnUser1 output to be fired.
 
FireUser2 Causes this entity's OnUser2 output to be fired.
 
FireUser3 Causes this entity's OnUser3 output to be fired.
 
FireUser4 Causes this entity's OnUser4 output to be fired.
 
Enable Enable this entity
 
Disable Disable this entity
 
 


==Outputs==
==Outputs==
 
* {{o targetname}}
OnUser1 Fired in response to FireUser1 input.
* '''OnConditionsSatisfied'''
 
:Fires when AI conditions satisfied
OnUser2 Fired in response to FireUser2 input.
* '''OnConditionsTimeout'''
 
:Fires when AI conditions timed out
OnUser3 Fired in response to FireUser3 input.
 
OnUser4 Fired in response to FireUser4 input.
 
OnConditionsSatisfied Fires when AI conditions satisfied
 
OnConditionsTimeout Fires when AI conditions timed out

Revision as of 12:36, 7 July 2006

Template:Wrongtitle

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

Entity Description

The keyvalues for this entity allow a mapper to define a list of conditions relating to the player, an NPC and a target (optional), to trigger events when these conditions are fulfilled.

For an example of its use, see d2_coast_03 (when Odessa gives Gordon the rocket launcher).

Keyvalues

  • Actor
<target_destination> NPC Target
  • StartDisabled
<boolean>
  • MinimumState
<choices>
Literal Value Description
1 Idle
2 Alert
3 Combat
  • MaximumState
<choices>
Literal Value Description
1 Idle
2 Alert
3 Combat
  • ScriptStatus
<boolean> Actor is running a script?
  • RequiredTime
<float> Duration of time that all the conditions must be true
  • MinTimeout
<float> Minimum time before OnConditionsTimeout is fired. 0 = never expire
  • MaxTimeout
<float> Maximum time before OnConditionsTimeout is fired. 0 = ignore
  • ActorSeePlayer
<boolean>
  • PlayerActorProximity
<float> The distance the player must/must not be to the actor. Negative values for NOT, 0 for ignore.
  • 'PlayerActorFOV
<float> Specify angle of view cone in degrees. Negative value = NOT
  • PlayerActorFOVTrueCone
<choices> Player's view cone is evaluated as a true cone, not pie slice
  • PlayerActorLOS
<boolean> Checks that the player has clear Line of Sight to the Actor
  • target
<target_destination> Optional entity to include in conditions
  • ActorSeeTarget
<boolean>
  • ActorTargetProximity
<float> The distance the actor must/must not be to the Target. Negative values for NOT, 0 for ignore.
  • PlayerTargetProximity
<float> The distance the player must/must not be to the Target. Negative values for NOT, 0 for ignore.
  • PlayerTargetFOV
<float> Specify angle of view cone in degrees. Negative value = NOT
  • PlayerTargetFOVTrueCone
<boolean> Player's view cone is evaluated as a true cone, not pie slice
  • PlayerTargetLOS
<boolean> Checks that the player has clear Line of Sight to the Target
  • PlayerBlockingActor
<boolean> Checks that the player is blocking the Actor's path

Inputs

Outputs

Fires when AI conditions satisfied
  • OnConditionsTimeout
Fires when AI conditions timed out