Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_AIUtilityComponent Interface Reference
Inheritance diagram for SCR_AIUtilityComponent:
SCR_AIBaseUtilityComponent AIBaseUtilityComponent

Public Member Functions

SCR_AIBehaviorBase EvaluateBehavior (BaseTarget unknownTarget)
 
bool ShouldKeepFormation ()
 Returns true if we should be mindful about our formation overall.
 
bool GetSubformationLeaderMoving ()
 Returns state of m_MovementDetector of our subformation leader.
 
bool GetNearSubformationLeader ()
 
bool IsSubformationLeader ()
 Returns true if this agent is leader of its subformation.
 
bool CanIndependentlyMove ()
 Independent attacking with movement is allowed only when group combat move is not present or unit state is EUnitState.IN_TURRET.
 
SCR_AIBehaviorBase GetCurrentBehavior ()
 
SCR_CharacterControllerComponent GetCharacterController ()
 
void CancelAllGroupActivityBehaviors (notnull SCR_AIGroupUtilityComponent groupUtility)
 
void WrapBehaviorOutsideOfVehicle (SCR_AIActionBase action)
 
override void EOnInit (IEntity owner)
 
void OnCompartmentEntered (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void OnCompartmentLeft (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
bool IsMilitary ()
 Are we a military AI or not?
 
override void EOnDiag (IEntity owner, float timeSlice)
 
vector GetOrigin ()
 
ScriptCallQueue GetCallqueue ()
 Returns CallQueue of this AI. It gets updated from EvaluateBehavior, so that it's synchronous with other AI logic.
 
void LookAt (vector pos, float duration=2)
 
void ~SCR_AIUtilityComponent ()
 
- Public Member Functions inherited from SCR_AIBaseUtilityComponent
void SendMessage (AIMessage msg, AIAgent receiver=null)
 
int DiagGetCounter ()
 
void DiagIncreaseCounter ()
 
void DiagSetBreakpoint ()
 
- Public Member Functions inherited from AIBaseUtilityComponent
proto external AIActionBase EvaluateActions ()
 Evaluate all actions and return the highest evaluated action which is not suspended. Returns nullptr if none found.
 
proto external void AddAction (AIActionBase action)
 Adds an action.
 
proto external bool RemoveObsoleteActions ()
 Removes actions which are failed or completed.
 
proto external void SetStateAllActionsOfType (TypeName actionType, EAIActionState actionState, bool includeInherited=false)
 Iterates through the actions changing the state of those of the type or that inherit from it.
 
proto external bool HasActionOfType (TypeName actionType)
 Returns true when there is an action of exactly this type.
 
proto external AIActionBase FindActionOfType (TypeName actionType)
 Finds action of exactly this type.
 
proto external AIActionBase FindActionOfInheritedType (TypeName actionType)
 Finds action of provided type or a type inherited from it.
 
proto external void FindActionsOfType (TypeName actionType, notnull array< ref AIActionBase > outActions)
 
proto external void FindActionsOfInheritedType (TypeName actionType, notnull array< ref AIActionBase > outActions)
 
proto external void SetStateOfRelatedAction (AIActionBase relatedAction, EAIActionState state)
 
proto external bool CallActionsOnMessage (AIMessage msg)
 
proto external void GetActions (notnull array< ref AIActionBase > outActions)
 
proto external ref AIActionBase GetCurrentAction ()
 
proto external void SetCurrentAction (AIActionBase executed)
 
proto external ref AIActionBase GetExecutedAction ()
 
proto external void SetExecutedAction (AIActionBase executed)
 
proto external AIAgent GetOwner ()
 
void OnPostInit (IEntity owner)
 
void EOnDeactivate (IEntity owner)
 
void EOnActivate (IEntity owner)
 

Public Attributes

GenericEntity m_OwnerEntity
 
SCR_AIConfigComponent m_ConfigComponent
 
SCR_AIInfoComponent m_AIInfo
 
SCR_AICombatComponent m_CombatComponent
 
PerceptionComponent m_PerceptionComponent
 
SCR_MailboxComponent m_Mailbox
 
SCR_AICharacterSettingsComponent m_SettingsComponent
 
ref SCR_AIThreatSystem m_ThreatSystem
 
ref SCR_AISectorThreatFilter m_SectorThreatFilter
 
ref SCR_AILookAction m_LookAction
 
ref SCR_AICommsHandler m_CommsHandler
 
ref SCR_AIBehaviorBase m_CurrentBehavior
 Used for avoiding constant casting, outside of this class use GetCurrentBehavior()
 
ref SCR_AICombatMoveState m_CombatMoveState
 
ref SCR_AIMovementDetector m_MovementDetector
 

Protected Member Functions

AIAgent GetSubformationLeaderAgent ()
 Returns leader agent of subformation of this agent.
 

Protected Attributes

SCR_CharacterControllerComponent m_OwnerController
 
FactionAffiliationComponent m_FactionComponent
 
ref ScriptCallQueue m_Callqueue
 
ref BaseTarget m_UnknownTarget
 
float m_fReactionUnknownTargetTime_ms
 WorldTime timestamp.
 
float m_fLastUpdateTime
 

Static Protected Attributes

static const float DISTANCE_HYSTERESIS_FACTOR = 0.45
 how bigger must be old distance to new in IsInvestigationRelevant()
 
static const float NEARBY_DISTANCE_SQ = 2500
 what is the minimal distance of new vs old in IsInvestigationRelevant()
 
static const float REACTION_TO_SAME_UNKNOWN_TARGET_INTERVAL_MS = 2500
 how often to react to same unknown target if it didn't change
 

Constructor & Destructor Documentation

◆ ~SCR_AIUtilityComponent()

void SCR_AIUtilityComponent.~SCR_AIUtilityComponent ( )

Member Function Documentation

◆ CancelAllGroupActivityBehaviors()

void SCR_AIUtilityComponent.CancelAllGroupActivityBehaviors ( notnull SCR_AIGroupUtilityComponent groupUtility)

◆ CanIndependentlyMove()

bool SCR_AIUtilityComponent.CanIndependentlyMove ( )

Independent attacking with movement is allowed only when group combat move is not present or unit state is EUnitState.IN_TURRET.

Returns

◆ EOnDiag()

override void SCR_AIUtilityComponent.EOnDiag ( IEntity owner,
float timeSlice )

◆ EOnInit()

override void SCR_AIUtilityComponent.EOnInit ( IEntity owner)

◆ EvaluateBehavior()

SCR_AIBehaviorBase SCR_AIUtilityComponent.EvaluateBehavior ( BaseTarget unknownTarget)
Parameters
[in]unknownTarget
Returns

◆ GetCallqueue()

ScriptCallQueue SCR_AIUtilityComponent.GetCallqueue ( )

Returns CallQueue of this AI. It gets updated from EvaluateBehavior, so that it's synchronous with other AI logic.

◆ GetCharacterController()

SCR_CharacterControllerComponent SCR_AIUtilityComponent.GetCharacterController ( )

◆ GetCurrentBehavior()

SCR_AIBehaviorBase SCR_AIUtilityComponent.GetCurrentBehavior ( )
Returns

◆ GetNearSubformationLeader()

bool SCR_AIUtilityComponent.GetNearSubformationLeader ( )

◆ GetOrigin()

vector SCR_AIUtilityComponent.GetOrigin ( )
Returns

◆ GetSubformationLeaderAgent()

AIAgent SCR_AIUtilityComponent.GetSubformationLeaderAgent ( )
protected

Returns leader agent of subformation of this agent.

◆ GetSubformationLeaderMoving()

bool SCR_AIUtilityComponent.GetSubformationLeaderMoving ( )

Returns state of m_MovementDetector of our subformation leader.

See SCR_AIMovementFilter class.

◆ IsMilitary()

bool SCR_AIUtilityComponent.IsMilitary ( )

Are we a military AI or not?

◆ IsSubformationLeader()

bool SCR_AIUtilityComponent.IsSubformationLeader ( )

Returns true if this agent is leader of its subformation.

◆ LookAt()

void SCR_AIUtilityComponent.LookAt ( vector pos,
float duration = 2 )

◆ OnCompartmentEntered()

void SCR_AIUtilityComponent.OnCompartmentEntered ( AIAgent agent,
IEntity targetEntity,
BaseCompartmentManagerComponent manager,
int mgrID,
int slotID,
bool move )

◆ OnCompartmentLeft()

void SCR_AIUtilityComponent.OnCompartmentLeft ( AIAgent agent,
IEntity targetEntity,
BaseCompartmentManagerComponent manager,
int mgrID,
int slotID,
bool move )

◆ ShouldKeepFormation()

bool SCR_AIUtilityComponent.ShouldKeepFormation ( )

Returns true if we should be mindful about our formation overall.

◆ WrapBehaviorOutsideOfVehicle()

void SCR_AIUtilityComponent.WrapBehaviorOutsideOfVehicle ( SCR_AIActionBase action)
Parameters
[in]action

Member Data Documentation

◆ DISTANCE_HYSTERESIS_FACTOR

const float SCR_AIUtilityComponent.DISTANCE_HYSTERESIS_FACTOR = 0.45
staticprotected

how bigger must be old distance to new in IsInvestigationRelevant()

◆ m_AIInfo

SCR_AIInfoComponent SCR_AIUtilityComponent.m_AIInfo

◆ m_Callqueue

ref ScriptCallQueue SCR_AIUtilityComponent.m_Callqueue
protected

◆ m_CombatComponent

SCR_AICombatComponent SCR_AIUtilityComponent.m_CombatComponent

◆ m_CombatMoveState

ref SCR_AICombatMoveState SCR_AIUtilityComponent.m_CombatMoveState

◆ m_CommsHandler

ref SCR_AICommsHandler SCR_AIUtilityComponent.m_CommsHandler

◆ m_ConfigComponent

SCR_AIConfigComponent SCR_AIUtilityComponent.m_ConfigComponent

◆ m_CurrentBehavior

ref SCR_AIBehaviorBase SCR_AIUtilityComponent.m_CurrentBehavior

Used for avoiding constant casting, outside of this class use GetCurrentBehavior()

◆ m_FactionComponent

FactionAffiliationComponent SCR_AIUtilityComponent.m_FactionComponent
protected

◆ m_fLastUpdateTime

float SCR_AIUtilityComponent.m_fLastUpdateTime
protected

◆ m_fReactionUnknownTargetTime_ms

float SCR_AIUtilityComponent.m_fReactionUnknownTargetTime_ms
protected

WorldTime timestamp.

◆ m_LookAction

ref SCR_AILookAction SCR_AIUtilityComponent.m_LookAction

◆ m_Mailbox

SCR_MailboxComponent SCR_AIUtilityComponent.m_Mailbox

◆ m_MovementDetector

ref SCR_AIMovementDetector SCR_AIUtilityComponent.m_MovementDetector

◆ m_OwnerController

SCR_CharacterControllerComponent SCR_AIUtilityComponent.m_OwnerController
protected

◆ m_OwnerEntity

GenericEntity SCR_AIUtilityComponent.m_OwnerEntity

◆ m_PerceptionComponent

PerceptionComponent SCR_AIUtilityComponent.m_PerceptionComponent

◆ m_SectorThreatFilter

ref SCR_AISectorThreatFilter SCR_AIUtilityComponent.m_SectorThreatFilter

◆ m_SettingsComponent

SCR_AICharacterSettingsComponent SCR_AIUtilityComponent.m_SettingsComponent

◆ m_ThreatSystem

ref SCR_AIThreatSystem SCR_AIUtilityComponent.m_ThreatSystem

◆ m_UnknownTarget

ref BaseTarget SCR_AIUtilityComponent.m_UnknownTarget
protected

◆ NEARBY_DISTANCE_SQ

const float SCR_AIUtilityComponent.NEARBY_DISTANCE_SQ = 2500
staticprotected

what is the minimal distance of new vs old in IsInvestigationRelevant()

◆ REACTION_TO_SAME_UNKNOWN_TARGET_INTERVAL_MS

const float SCR_AIUtilityComponent.REACTION_TO_SAME_UNKNOWN_TARGET_INTERVAL_MS = 2500
staticprotected

how often to react to same unknown target if it didn't change


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