Third Person Cover Shooter  1.6
CoverShooter.AIActions Class Reference

Stores possible actions for the AI to take. More...

Inheritance diagram for CoverShooter.AIActions:
CoverShooter.AIBase

Public Member Functions

void Execute (AIAction action)
 Executes the given action. More...
 
void Execute (AIAction action, Vector3 position)
 Executes the given action targeted at a position. More...
 
void Execute (AIAction action, Actor target)
 Executes the given action targeted at an actor. More...
 
void ToStopActions ()
 Catches a message that asks to end all actions. More...
 
void OnFinishAction ()
 Catches an animator message and passes it to the current action. More...
 
void OnThrow ()
 Catches a throw of a grenade and passes it to the current action. More...
 
void ToStopMoving ()
 Catches an AI command to stop moving. More...
 
void OnFinishTakeCover ()
 Registers that the AI has stopped running to cover. More...
 
void OnFoundCover ()
 Registers that the AI has began moving to cover. More...
 
- Public Member Functions inherited from CoverShooter.AIBase
void Message (string name)
 Sends a message to other components. More...
 
void Message (string name, object value)
 Sends a message to other components. More...
 

Public Attributes

AIAction [] Actions
 Array of possible actions. More...
 
Actor Priority
 An actor that is prioritized over others when performing relevant actions. More...
 
float AutoCooldown = 8
 Time in seconds to wait after making another automatic action. More...
 
float AutoDistance = 20
 Distance at which the AI will consider other actors as target of an auto action. More...
 
bool AutoAttackOnlyFromCover = true
 Should the automatic actions against enemies be performed when in cover. More...
 
bool WaitForCoverActions = true
 If other AI components are taking cover, should the actions be delayed until they are finished. More...
 
float CoverDelay = 2
 Once the AI has taken cover, how many seconds to wait before considering an action. More...
 
float Timeout = 4
 If an action is being performed and it takes too long it will be cancelled. More...
 

Properties

bool IsPerforming [get]
 Is there an action that is currently being performed. More...
 
AIAction Active [get]
 Action currently being performed. More...
 
bool HasAllyActions [get]
 Are there any actions that can target allies. More...
 

Detailed Description

Stores possible actions for the AI to take.

Can automatically execute actions.

Member Function Documentation

◆ Execute() [1/3]

void CoverShooter.AIActions.Execute ( AIAction  action)

Executes the given action.

Does not necessarily have to belong to the Actions list.

◆ Execute() [2/3]

void CoverShooter.AIActions.Execute ( AIAction  action,
Vector3  position 
)

Executes the given action targeted at a position.

Does not necessarily have to belong to the Actions list.

◆ Execute() [3/3]

void CoverShooter.AIActions.Execute ( AIAction  action,
Actor  target 
)

Executes the given action targeted at an actor.

Does not necessarily have to belong to the Actions list.

◆ OnFinishAction()

void CoverShooter.AIActions.OnFinishAction ( )

Catches an animator message and passes it to the current action.

◆ OnFinishTakeCover()

void CoverShooter.AIActions.OnFinishTakeCover ( )

Registers that the AI has stopped running to cover.

◆ OnFoundCover()

void CoverShooter.AIActions.OnFoundCover ( )

Registers that the AI has began moving to cover.

◆ OnThrow()

void CoverShooter.AIActions.OnThrow ( )

Catches a throw of a grenade and passes it to the current action.

◆ ToStopActions()

void CoverShooter.AIActions.ToStopActions ( )

Catches a message that asks to end all actions.

◆ ToStopMoving()

void CoverShooter.AIActions.ToStopMoving ( )

Catches an AI command to stop moving.

Member Data Documentation

◆ Actions

AIAction [] CoverShooter.AIActions.Actions

Array of possible actions.

◆ AutoAttackOnlyFromCover

bool CoverShooter.AIActions.AutoAttackOnlyFromCover = true

Should the automatic actions against enemies be performed when in cover.

◆ AutoCooldown

float CoverShooter.AIActions.AutoCooldown = 8

Time in seconds to wait after making another automatic action.

◆ AutoDistance

float CoverShooter.AIActions.AutoDistance = 20

Distance at which the AI will consider other actors as target of an auto action.

◆ CoverDelay

float CoverShooter.AIActions.CoverDelay = 2

Once the AI has taken cover, how many seconds to wait before considering an action.

◆ Priority

Actor CoverShooter.AIActions.Priority

An actor that is prioritized over others when performing relevant actions.

◆ Timeout

float CoverShooter.AIActions.Timeout = 4

If an action is being performed and it takes too long it will be cancelled.

Some actions have no timeout.

◆ WaitForCoverActions

bool CoverShooter.AIActions.WaitForCoverActions = true

If other AI components are taking cover, should the actions be delayed until they are finished.

Property Documentation

◆ Active

AIAction CoverShooter.AIActions.Active
get

Action currently being performed.

Null if none.

◆ HasAllyActions

bool CoverShooter.AIActions.HasAllyActions
get

Are there any actions that can target allies.

◆ IsPerforming

bool CoverShooter.AIActions.IsPerforming
get

Is there an action that is currently being performed.


The documentation for this class was generated from the following file: