Third Person Cover Shooter  1.6
CoverShooter.AISearch Class Reference

Allows the AI to search the level to find an enemy. More...

Inheritance diagram for CoverShooter.AISearch:
CoverShooter.AIBase

Public Member Functions

void ToSearch ()
 Told by the brains to start search at the current location. More...
 
void ToSearchAt (SearchPoint point)
 Told by the brains to start searching a ta position. More...
 
void ToStopSearch ()
 Told by the brains to stop searching. More...
 
void ToMarkPointInspected (Vector3 position)
 Told by the brains to force mark a position as investigated. More...
 
void ToClearSearchHistory ()
 Told by the brains to forget all search history. More...
 
void SearchCheck ()
 Responds with an answer to a brain enquiry. More...
 
void OnFoundFriend (Actor friend)
 Notified that a friend was found. More...
 
void OnLostFriend (Actor friend)
 Notified that a friend got out of range. More...
 
void OnPositionUnreachable (Vector3 point)
 Notified that a position is unreachable. 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

float VerifyHeight = 0.7f
 At which height the AI confirms the point as investigated. More...
 
float FieldOfView = 90
 Field of sight to register the search position. More...
 
float WalkDistance = 8
 Distance at which AI turns from running to walking to safely investigate the position. More...
 
bool DebugTarget = false
 Should a line to the intended search point be drawn in the editor. More...
 
bool DebugPoints = false
 Should information about search points be displayed. More...
 

Static Public Attributes

static float CoverOffset = 2
 Offset from cover the AI keeps when approaching it from a side. More...
 
static float BlockThreshold = 3
 Search points belong in the same search block if they are closer to each other than this distance. More...
 
static float BlockCenterThreshold = 6
 A search point is considered to belong in a block if it is closer than this value to it's center. More...
 
static float VerifyDistance = 16
 Distance to target location the AI has to reach for it to be marked as investigated. More...
 
static float MaxDistance = 10000
 Maximum distance of a location for AI to search. More...
 

Detailed Description

Allows the AI to search the level to find an enemy.

The AI searches each cover and search zone. Searches are done by positions. For example, a cover might have 4 positions the AI has to inspect. Positions are grouped into blocks and AI always checks every position inside a block before moving onto another block.

Member Function Documentation

◆ OnFoundFriend()

void CoverShooter.AISearch.OnFoundFriend ( Actor  friend)

Notified that a friend was found.

◆ OnLostFriend()

void CoverShooter.AISearch.OnLostFriend ( Actor  friend)

Notified that a friend got out of range.

◆ OnPositionUnreachable()

void CoverShooter.AISearch.OnPositionUnreachable ( Vector3  point)

Notified that a position is unreachable.

◆ SearchCheck()

void CoverShooter.AISearch.SearchCheck ( )

Responds with an answer to a brain enquiry.

◆ ToClearSearchHistory()

void CoverShooter.AISearch.ToClearSearchHistory ( )

Told by the brains to forget all search history.

◆ ToMarkPointInspected()

void CoverShooter.AISearch.ToMarkPointInspected ( Vector3  position)

Told by the brains to force mark a position as investigated.

◆ ToSearch()

void CoverShooter.AISearch.ToSearch ( )

Told by the brains to start search at the current location.

◆ ToSearchAt()

void CoverShooter.AISearch.ToSearchAt ( SearchPoint  point)

Told by the brains to start searching a ta position.

>

◆ ToStopSearch()

void CoverShooter.AISearch.ToStopSearch ( )

Told by the brains to stop searching.

Member Data Documentation

◆ BlockCenterThreshold

float CoverShooter.AISearch.BlockCenterThreshold = 6
static

A search point is considered to belong in a block if it is closer than this value to it's center.

◆ BlockThreshold

float CoverShooter.AISearch.BlockThreshold = 3
static

Search points belong in the same search block if they are closer to each other than this distance.

◆ CoverOffset

float CoverShooter.AISearch.CoverOffset = 2
static

Offset from cover the AI keeps when approaching it from a side.

◆ DebugPoints

bool CoverShooter.AISearch.DebugPoints = false

Should information about search points be displayed.

◆ DebugTarget

bool CoverShooter.AISearch.DebugTarget = false

Should a line to the intended search point be drawn in the editor.

◆ FieldOfView

float CoverShooter.AISearch.FieldOfView = 90

Field of sight to register the search position.

◆ MaxDistance

float CoverShooter.AISearch.MaxDistance = 10000
static

Maximum distance of a location for AI to search.

◆ VerifyDistance

float CoverShooter.AISearch.VerifyDistance = 16
static

Distance to target location the AI has to reach for it to be marked as investigated.

◆ VerifyHeight

float CoverShooter.AISearch.VerifyHeight = 0.7f

At which height the AI confirms the point as investigated.

◆ WalkDistance

float CoverShooter.AISearch.WalkDistance = 8

Distance at which AI turns from running to walking to safely investigate the position.


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