Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | Static Protected Attributes | List of all members
SCR_AIUtilityComponent Interface Reference
Inheritance diagram for SCR_AIUtilityComponent:
[legend]

Public Member Functions

SCR_AIBehaviorBase EvaluateBehavior (BaseTarget unknownTarget)
 
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 ()
 
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 ()
 
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 EOnInit (IEntity owner)
 
void OnPostInit (IEntity owner)
 
void EOnDeactivate (IEntity owner)
 
void EOnDiag (IEntity owner, float timeSlice)
 
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
 
ref SCR_AIThreatSystem m_ThreatSystem
 
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
 

Protected Attributes

SCR_CharacterControllerComponent m_OwnerController
 
FactionAffiliationComponent m_FactionComponent
 
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

◆ GetCurrentBehavior()

SCR_AIBehaviorBase SCR_AIUtilityComponent.GetCurrentBehavior ( )
Returns

◆ GetOrigin()

vector SCR_AIUtilityComponent.GetOrigin ( )
Returns

◆ IsMilitary()

bool SCR_AIUtilityComponent.IsMilitary ( )

Are we a military AI or not?

◆ 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 
)

◆ 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_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_OwnerController

SCR_CharacterControllerComponent SCR_AIUtilityComponent.m_OwnerController
protected

◆ m_OwnerEntity

GenericEntity SCR_AIUtilityComponent.m_OwnerEntity

◆ m_PerceptionComponent

PerceptionComponent SCR_AIUtilityComponent.m_PerceptionComponent

◆ 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: