Third Person Cover Shooter  1.6
CoverShooter.AIAction Class Referenceabstract

Describes and executes an AI action. More...

Inheritance diagram for CoverShooter.AIAction:
CoverShooter.EffectAction CoverShooter.GrenadeAction CoverShooter.InstantAction CoverShooter.AnimatedActorAction CoverShooter.AnimatedAreaAction CoverShooter.AnimatedMassAction CoverShooter.AttackAction CoverShooter.HoldPositionAction CoverShooter.ShieldAction CoverShooter.DamageBuffAction CoverShooter.HealAction CoverShooter.MassArmorBuffAction CoverShooter.MassDamageBuffAction CoverShooter.MassHealAction

Public Member Functions

void SetupActor (Actor actor)
 Set's the actor that executes the action. More...
 
bool Execute (Actor actor)
 Starts the action by the given executor. More...
 
bool Execute (Actor actor, Vector3 position)
 Starts the action by the given executor. More...
 
bool Execute (Actor actor, Actor target)
 Starts the action by the given executor. More...
 
virtual bool IsNeededFor (Actor target)
 Should the AI perform the action on the given target. More...
 
virtual bool OnFinishAction ()
 Catches the animator event during the execution and may perform the action. More...
 
virtual bool OnThrow ()
 Catches the animator event during the throw animation and may perform the action. More...
 
abstract bool Update ()
 Updates the action during it's execution. More...
 
abstract void Stop ()
 Stops the action at the end of it's execution. More...
 
virtual bool WillMoveForActor (Actor target)
 Will the action require it's executor to move if targeted at the given actor. More...
 
virtual bool WillMoveForPosition (Vector3 target)
 Will the action require it's executor to move if targeted at the given position. More...
 

Public Attributes

bool Auto
 Is the action performed automatically by the AI. More...
 
float Cooldown = 1
 Time in seconds to wait after activation before the action can be performed again. More...
 

Protected Member Functions

void MarkCooldown ()
 Set's the cooldown timer. More...
 
abstract bool Start ()
 Starts the action. More...
 

Protected Attributes

Actor _actor
 
Actor _targetActor
 
Vector3 _targetPosition
 

Properties

bool CanTargetAny [get]
 Can the action be targeted at both enemies and allies. More...
 
bool NeedsTargetLocation [get]
 Does the action require a target location to be executed. More...
 
bool NeedsOnlySelf [get]
 Can the action include self. More...
 
bool NeedsSingleTargetActor [get]
 Is the action always targeted at a single actor. More...
 
float Wait [get]
 Time in seconds left to wait before the action can be used again. More...
 
virtual bool CanTargetSelf [get]
 Can the action target the executor themselves. More...
 
virtual bool CanTargetEnemy [get]
 Can the action target enemies of the executor directly. More...
 
virtual bool CanTargetAlly [get]
 Can the action target allies of the executor directly. More...
 
virtual bool ShouldIgnoreDead [get]
 Should the UI ignore dead actors when picking targets. More...
 
virtual bool CanTargetGround [get]
 Can the action be targeted at a location and not actors. More...
 
virtual bool CanTargetMultiple [get]
 Can the action target multiple actors at once. More...
 
virtual bool HasNoTimeout [get]
 Can the action be cancelled if the Timout in AIActions is triggered. More...
 
virtual float UIRadius [get]
 Radius of the target sphere when the action is displayed in the UI. More...
 
abstract Color UIColor [get]
 Color of the action when presented in the UI. More...
 

Detailed Description

Describes and executes an AI action.

Member Function Documentation

◆ Execute() [1/3]

bool CoverShooter.AIAction.Execute ( Actor  actor)

Starts the action by the given executor.

Returns true if the action was successfully started.

◆ Execute() [2/3]

bool CoverShooter.AIAction.Execute ( Actor  actor,
Vector3  position 
)

Starts the action by the given executor.

Action is targeted at a location. Returns true if the action was successfully started.

◆ Execute() [3/3]

bool CoverShooter.AIAction.Execute ( Actor  actor,
Actor  target 
)

Starts the action by the given executor.

Action is targeted at a target actor. Returns true if the action was successfully started.

◆ IsNeededFor()

virtual bool CoverShooter.AIAction.IsNeededFor ( Actor  target)
virtual

◆ MarkCooldown()

void CoverShooter.AIAction.MarkCooldown ( )
protected

Set's the cooldown timer.

◆ OnFinishAction()

virtual bool CoverShooter.AIAction.OnFinishAction ( )
virtual

Catches the animator event during the execution and may perform the action.

Returns true if that is the case.

Reimplemented in CoverShooter.AnimatedActorAction, CoverShooter.AnimatedAreaAction, and CoverShooter.AnimatedMassAction.

◆ OnThrow()

virtual bool CoverShooter.AIAction.OnThrow ( )
virtual

Catches the animator event during the throw animation and may perform the action.

Returns true if that is the case.

Reimplemented in CoverShooter.GrenadeAction.

◆ SetupActor()

void CoverShooter.AIAction.SetupActor ( Actor  actor)

Set's the actor that executes the action.

◆ Start()

abstract bool CoverShooter.AIAction.Start ( )
protectedpure virtual

Starts the action.

Returns true if the action should continue running until finished.

Implemented in CoverShooter.GrenadeAction, CoverShooter.AnimatedAreaAction, CoverShooter.AnimatedActorAction, CoverShooter.AnimatedMassAction, and CoverShooter.InstantAction.

◆ Stop()

abstract void CoverShooter.AIAction.Stop ( )
pure virtual

◆ Update()

abstract bool CoverShooter.AIAction.Update ( )
pure virtual

Updates the action during it's execution.

If false is returned the action is stopped.

Implemented in CoverShooter.GrenadeAction, CoverShooter.AnimatedActorAction, CoverShooter.AnimatedAreaAction, CoverShooter.AnimatedMassAction, and CoverShooter.InstantAction.

◆ WillMoveForActor()

virtual bool CoverShooter.AIAction.WillMoveForActor ( Actor  target)
virtual

Will the action require it's executor to move if targeted at the given actor.

Reimplemented in CoverShooter.AnimatedActorAction.

◆ WillMoveForPosition()

virtual bool CoverShooter.AIAction.WillMoveForPosition ( Vector3  target)
virtual

Will the action require it's executor to move if targeted at the given position.

Reimplemented in CoverShooter.AnimatedAreaAction, and CoverShooter.GrenadeAction.

Member Data Documentation

◆ _actor

Actor CoverShooter.AIAction._actor
protected

◆ _targetActor

Actor CoverShooter.AIAction._targetActor
protected

◆ _targetPosition

Vector3 CoverShooter.AIAction._targetPosition
protected

◆ Auto

bool CoverShooter.AIAction.Auto

Is the action performed automatically by the AI.

Actions without any possible targets (like simple movement) won't be performed.

◆ Cooldown

float CoverShooter.AIAction.Cooldown = 1

Time in seconds to wait after activation before the action can be performed again.

Property Documentation

◆ CanTargetAlly

virtual bool CoverShooter.AIAction.CanTargetAlly
get

Can the action target allies of the executor directly.

◆ CanTargetAny

bool CoverShooter.AIAction.CanTargetAny
get

Can the action be targeted at both enemies and allies.

◆ CanTargetEnemy

virtual bool CoverShooter.AIAction.CanTargetEnemy
get

Can the action target enemies of the executor directly.

◆ CanTargetGround

virtual bool CoverShooter.AIAction.CanTargetGround
get

Can the action be targeted at a location and not actors.

◆ CanTargetMultiple

virtual bool CoverShooter.AIAction.CanTargetMultiple
get

Can the action target multiple actors at once.

◆ CanTargetSelf

virtual bool CoverShooter.AIAction.CanTargetSelf
get

Can the action target the executor themselves.

◆ HasNoTimeout

virtual bool CoverShooter.AIAction.HasNoTimeout
get

Can the action be cancelled if the Timout in AIActions is triggered.

◆ NeedsOnlySelf

bool CoverShooter.AIAction.NeedsOnlySelf
get

Can the action include self.

◆ NeedsSingleTargetActor

bool CoverShooter.AIAction.NeedsSingleTargetActor
get

Is the action always targeted at a single actor.

◆ NeedsTargetLocation

bool CoverShooter.AIAction.NeedsTargetLocation
get

Does the action require a target location to be executed.

◆ ShouldIgnoreDead

virtual bool CoverShooter.AIAction.ShouldIgnoreDead
get

Should the UI ignore dead actors when picking targets.

◆ UIColor

abstract Color CoverShooter.AIAction.UIColor
get

Color of the action when presented in the UI.

◆ UIRadius

virtual float CoverShooter.AIAction.UIRadius
get

Radius of the target sphere when the action is displayed in the UI.

◆ Wait

float CoverShooter.AIAction.Wait
get

Time in seconds left to wait before the action can be used again.


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