Ai script conditions: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Spam revert.)
m (→‎Keyvalues: minor cleanup)
Line 43: Line 43:


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


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


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


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


* '''PlayerActorFOV''
* '''PlayerActorFOV'''
: <float> Specify angle of view cone in degrees. Negative value = NOT
: <float> Specify angle of [[viewcone]] in degrees. Negative value = NOT.


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


* '''PlayerActorLOS'''
* '''PlayerActorLOS'''
: {{boolean}} Checks that the player has clear Line of Sight to the Actor
: {{boolean}} Checks that the player has clear Line of Sight to the Actor.


* '''target'''
* '''target'''
: <target_destination> Optional entity to include in conditions
: <target_destination> Optional entity to include in conditions.


* '''ActorSeeTarget'''
* '''ActorSeeTarget'''
Line 79: Line 79:


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


* '''PlayerTargetFOVTrueCone'''
* '''PlayerTargetFOVTrueCone'''
: {{boolean}} Player's view cone is evaluated as a true cone, not pie slice  
: {{boolean}} Player's view cone is evaluated as a true cone, not pie slice.


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


* '''PlayerBlockingActor'''
* '''PlayerBlockingActor'''
: {{boolean}} Checks that the player is blocking the Actor's path
: {{boolean}} Checks that the player is blocking the Actor's path.
* '''{{ep1 add|ActorInPVS}}'''
* '''{{ep1 add|ActorInPVS}}'''
: <choices> Checks that the actor is in the player's PVS
: <choices> Checks that the actor is in the player's [[PVS]].
:{|
:{|
! Literal Value || Description
! Literal Value || Description
Line 100: Line 100:
| 2 || Don't care
| 2 || Don't care
|}
|}
==Flags==
==Flags==
* {{ep1 add|1 : Fire outputs with the Actor as Activator}}
* {{ep1 add|1 : Fire outputs with the Actor as Activator}}

Revision as of 05:24, 20 March 2008

Template:Wrongtitle

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
  • 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 viewcone 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.
<choices> Checks that the actor is in the player's PVS.
Literal Value Description
0 No
1 Yes
2 Don't care

Flags

Inputs

Outputs

Fires when AI conditions satisfied
  • OnConditionsTimeout
Fires when AI conditions timed out
Fires if/when there are no matching actors in the map.