Third Person Cover Shooter  1.6
CoverShooter.AIFear Class Reference

Checks the situation and issues a command to the brains to become scared. More...

Inheritance diagram for CoverShooter.AIFear:
CoverShooter.AIBase CoverShooter.IAlertListener

Public Member Functions

void OnAlert (ref GeneratedAlert alert)
 Registers an alert. More...
 
void OnThreat (Actor threat)
 Is notified of an existance of a threat. More...
 
void OnNoThreat ()
 Is notified that there is no threat. More...
 
void OnSeeActor (Actor actor)
 Notified by the sight AI that an actor has entered the view. More...
 
void OnUnseeActor (Actor actor)
 Notified by the sight AI that an actor has dissappeared from the view. 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

bool OnlyScaredOfArmed = true
 AI doesn't get afraid of enemies with no equipped weapons. More...
 
float ImmediateScareChance = 0.25f
 Chance that an alerted civilian will immediately flee. More...
 
float MinFightHealth = 0.25f
 Fraction of health at which the AI runs in fear. More...
 
bool FleeAfterSomeTime = false
 Should the AI flee after some time passes. More...
 
float MinFleeTime = 0
 Minimum possible time the AI will fight before fleeing. More...
 
float MaxFleeTime = 60
 Maximum possible the AI will fight before fleeing. More...
 
bool FleeOnHostileAlerts = false
 Will the AI flee on hearing gunfire and other hostile alerts. More...
 
bool FleeOnSeingMilitary = false
 Will the AI flee on sight of an active military. More...
 

Detailed Description

Checks the situation and issues a command to the brains to become scared.

Can be used by both civilians and fighters.

Member Function Documentation

◆ OnAlert()

void CoverShooter.AIFear.OnAlert ( ref GeneratedAlert  alert)

Registers an alert.

Flees if hostile and is told to do so.

Implements CoverShooter.IAlertListener.

◆ OnNoThreat()

void CoverShooter.AIFear.OnNoThreat ( )

Is notified that there is no threat.

◆ OnSeeActor()

void CoverShooter.AIFear.OnSeeActor ( Actor  actor)

Notified by the sight AI that an actor has entered the view.

◆ OnThreat()

void CoverShooter.AIFear.OnThreat ( Actor  threat)

Is notified of an existance of a threat.

May immediately flee.

◆ OnUnseeActor()

void CoverShooter.AIFear.OnUnseeActor ( Actor  actor)

Notified by the sight AI that an actor has dissappeared from the view.

Member Data Documentation

◆ FleeAfterSomeTime

bool CoverShooter.AIFear.FleeAfterSomeTime = false

Should the AI flee after some time passes.

◆ FleeOnHostileAlerts

bool CoverShooter.AIFear.FleeOnHostileAlerts = false

Will the AI flee on hearing gunfire and other hostile alerts.

◆ FleeOnSeingMilitary

bool CoverShooter.AIFear.FleeOnSeingMilitary = false

Will the AI flee on sight of an active military.

◆ ImmediateScareChance

float CoverShooter.AIFear.ImmediateScareChance = 0.25f

Chance that an alerted civilian will immediately flee.

◆ MaxFleeTime

float CoverShooter.AIFear.MaxFleeTime = 60

Maximum possible the AI will fight before fleeing.

◆ MinFightHealth

float CoverShooter.AIFear.MinFightHealth = 0.25f

Fraction of health at which the AI runs in fear.

◆ MinFleeTime

float CoverShooter.AIFear.MinFleeTime = 0

Minimum possible time the AI will fight before fleeing.

Ised only when FleeAfterSomeTime is enabled.

◆ OnlyScaredOfArmed

bool CoverShooter.AIFear.OnlyScaredOfArmed = true

AI doesn't get afraid of enemies with no equipped weapons.


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