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

Public Member Functions

void SetFireRateCoef (float coef=1, bool overridePersistent=false)
 
float GetFireRateCoef ()
 
float GetThreatMeasure ()
 
void SetMaxAutonomousDistance (float dist)
 Sets max distance for various autonomous behaviors.
 
float GetMaxAutonomousDistance ()
 
void SetCombatMode (EAIGroupCombatMode combatMode)
 Sets combat mode as desired by external means, such as scenario, or commanding, or game master.
 
EAIGroupCombatMode GetCombatModeExternal ()
 See SetCombatMode.
 
EAIGroupCombatMode GetCombatModeActual ()
 Returns actual combat mode. See comment to EvaluateCombatMode method.
 
SCR_AIActionBase EvaluateActivity (out bool restartActivity)
 
void EvaluateCombatMode ()
 Resolves which actual combat mode the group has now, based on external combat mode.
 
void EvaluateFlareUsage ()
 
SCR_AITargetClusterState GetCurrentSuppressClusterState ()
 
bool AnyMembersInsideBBox (vector bbMin, vector bbMax)
 
void OnAgentAdded (AIAgent agent)
 Updates info of group members to planner - should be called when adding or removing group member.
 
void OnAgentRemoved (SCR_AIGroup group, AIAgent agent)
 
void OnWaypointCompleted (AIWaypoint waypoint)
 
void OnWaypointRemoved (AIWaypoint waypoint, bool isCurrentWaypoint)
 
void OnAgentLifeStateChanged (AIAgent incapacitatedAgent, SCR_AIInfoComponent infoIncap, IEntity vehicle, ECharacterLifeState lifeState)
 
void OnCurrentWaypointChanged (AIWaypoint currentWp, AIWaypoint prevWp)
 
void OnExecuteWaypointTree ()
 
void OnEnemyDetectedFiltered (SCR_AIGroup group, SCR_AITargetInfo target, AIAgent reporter)
 Called from m_Perception.
 
void OnTargetClusterStateChanged (SCR_AITargetClusterState state, EAITargetClusterState prevState, EAITargetClusterState newState)
 
void CancelActivitiesRelatedToWaypoint (notnull AIWaypoint waypoint, TypeName activityType=TypeName.Empty)
 
void OnMoveFailed (int moveResult, IEntity vehicleUsed, bool isWaypointRelated, vector moveLocation)
 
ScriptInvoker_GroupMoveFailed GetOnMoveFailed ()
 
override void EOnInit (IEntity owner)
 
override void EOnDiag (IEntity owner, float timeSlice)
 
void UpdateGroupControlMode (SCR_AIActionBase currentAction)
 
void UpdateClustersState (float deltaTime_ms)
 Iterates all clusters and updates their state.
 
bool IsPositionAllowed (vector pos)
 Decides whether we are allowed to go to this position.
 
bool IsUsableVehicle (notnull SCR_AIVehicleUsageComponent vehicleUsageComp)
 
bool IsUsableVehicle (notnull IEntity vehicleEntity)
 
void AddUsableVehicle (notnull SCR_AIVehicleUsageComponent vehicleUsageComp)
 
void RemoveUsableVehicle (notnull SCR_AIVehicleUsageComponent vehicleUsageComp)
 
bool IsMilitary ()
 Are we a military AI or not?
 
- 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

SCR_AIGroup m_Owner
 
SCR_AIConfigComponent m_ConfigComponent
 
SCR_AIGroupInfoComponent m_GroupInfo
 
SCR_AIGroupMovementComponent m_GroupMovementComponent
 
SCR_MailboxComponent m_Mailbox
 
SCR_AIGroupSettingsComponent m_SettingsComponent
 
ref array< SCR_AIInfoComponentm_aInfoComponents = {}
 
ref ScriptInvoker_GroupMoveFailed m_OnMoveFailed
 
ref ScriptInvokerBase< SCR_AIOnAgentLifeStateChanged > m_OnAgentLifeStateChanged = new ScriptInvokerBase<SCR_AIOnAgentLifeStateChanged>()
 
ref SCR_AIGroupPerception m_Perception
 
ref SCR_AIGroupFireteamManager m_FireteamMgr
 
ref SCR_AIGroupVehicleManager m_VehicleMgr
 
int m_iGetMemberByGoalNextIndex = 0
 

Static Public Attributes

const float SUPPRESS_MAX_CLUSTER_INFO_AGE_S = 90
 
const float SUPPRESS_OLD_CLUSTER_INFO_AGE_S = 15
 
const float SUPPRESS_MAX_DESTROYED_CLUSTER_INFO_AGE_S = 10
 
const float SUPPRESS_MIN_DIST_TO_CLUSTER_M = 30
 
const float SUPPRESS_MAX_DIST_TO_CLUSTER_M = 800
 

Protected Member Functions

void UpdateThreatMeasure ()
 
bool ShouldSuppressCluster (SCR_AITargetClusterState clusterState)
 
void UpdateSuppressCluster ()
 
void OnAgentCompartmentEntered (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
void JoinSubgroup (AIAgent agent, int handleId, bool isSubgroupLeader)
 
bool OnJoinGroupFromVehicle (AIAgent agent, bool isDriving)
 
int CreateNewSubgroup (AIAgent agent, bool isSubgroupLeader, SCR_AIGroupVehicle groupVehicle)
 
void LeaveSubgroup (AIAgent agent, SCR_AIGroupVehicle groupVehicle)
 
void OnAgentCompartmentLeft (AIAgent agent, IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
 
bool CanRebalanceFireteams ()
 Determines when we can rebalance fireteams. We don't want to do that when fighting for example.
 
void OnVehicleDeleted (SCR_AIVehicleUsageComponent comp)
 
void OnVehicleDamageStateChanged (SCR_AIVehicleUsageComponent comp, EDamageState state)
 

Protected Attributes

float m_fLastUpdateTime = -1.0
 
float m_fPerceptionUpdateTimer_ms
 
float m_fMaxAutonomousDistance = AUTONOMOUS_DISTANCE_MAX_DEFAULT
 
bool m_bNewGroupMemberAdded
 
ref SCR_AIActionBase m_CurrentActivity
 
ref SCR_AIWaypointState m_WaypointState
 
ref SCR_AIGroupTargetClusterProcessor m_TargetClusterProcessor
 
float m_fThreatMeasure
 
float m_fFireRateCoef = 1
 
ref SCR_AITargetClusterState m_CurrentSuppressClusterState
 
EAIGroupCombatMode m_eCombatModeExternal = EAIGroupCombatMode.FIRE_AT_WILL
 
EAIGroupCombatMode m_eCombatModeActual = EAIGroupCombatMode.FIRE_AT_WILL
 

Static Protected Attributes

static const float AUTONOMOUS_DISTANCE_MAX_DEFAULT = 9999
 
const float PERCEPTION_UPDATE_TIMER_MS = 2000.0
 

Member Function Documentation

◆ AddUsableVehicle()

void SCR_AIGroupUtilityComponent.AddUsableVehicle ( notnull SCR_AIVehicleUsageComponent vehicleUsageComp)

◆ AnyMembersInsideBBox()

bool SCR_AIGroupUtilityComponent.AnyMembersInsideBBox ( vector bbMin,
vector bbMax )

◆ CancelActivitiesRelatedToWaypoint()

void SCR_AIGroupUtilityComponent.CancelActivitiesRelatedToWaypoint ( notnull AIWaypoint waypoint,
TypeName activityType = TypeName::Empty )
Parameters
[in]waypoint
[in]activityType

◆ CanRebalanceFireteams()

bool SCR_AIGroupUtilityComponent.CanRebalanceFireteams ( )
protected

Determines when we can rebalance fireteams. We don't want to do that when fighting for example.

◆ CreateNewSubgroup()

int SCR_AIGroupUtilityComponent.CreateNewSubgroup ( AIAgent agent,
bool isSubgroupLeader,
SCR_AIGroupVehicle groupVehicle )
protected

◆ EOnDiag()

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

◆ EOnInit()

override void SCR_AIGroupUtilityComponent.EOnInit ( IEntity owner)

◆ EvaluateActivity()

SCR_AIActionBase SCR_AIGroupUtilityComponent.EvaluateActivity ( out bool restartActivity)
Parameters
[out]restartActivity
Returns

◆ EvaluateCombatMode()

void SCR_AIGroupUtilityComponent.EvaluateCombatMode ( )

Resolves which actual combat mode the group has now, based on external combat mode.

Actual combat mode can be only either HOLD_FIRE or FIRE_AT_WILL, Depending on external combat mode value, and if gorup considers itself under attack or not.

◆ EvaluateFlareUsage()

void SCR_AIGroupUtilityComponent.EvaluateFlareUsage ( )

◆ GetCombatModeActual()

EAIGroupCombatMode SCR_AIGroupUtilityComponent.GetCombatModeActual ( )

Returns actual combat mode. See comment to EvaluateCombatMode method.

◆ GetCombatModeExternal()

EAIGroupCombatMode SCR_AIGroupUtilityComponent.GetCombatModeExternal ( )

See SetCombatMode.

◆ GetCurrentSuppressClusterState()

SCR_AITargetClusterState SCR_AIGroupUtilityComponent.GetCurrentSuppressClusterState ( )

◆ GetFireRateCoef()

float SCR_AIGroupUtilityComponent.GetFireRateCoef ( )

◆ GetMaxAutonomousDistance()

float SCR_AIGroupUtilityComponent.GetMaxAutonomousDistance ( )

◆ GetOnMoveFailed()

ScriptInvoker_GroupMoveFailed SCR_AIGroupUtilityComponent.GetOnMoveFailed ( )

◆ GetThreatMeasure()

float SCR_AIGroupUtilityComponent.GetThreatMeasure ( )

◆ IsMilitary()

bool SCR_AIGroupUtilityComponent.IsMilitary ( )

Are we a military AI or not?

◆ IsPositionAllowed()

bool SCR_AIGroupUtilityComponent.IsPositionAllowed ( vector pos)

Decides whether we are allowed to go to this position.

Parameters
[in]pos
Returns

◆ IsUsableVehicle() [1/2]

bool SCR_AIGroupUtilityComponent.IsUsableVehicle ( notnull IEntity vehicleEntity)

◆ IsUsableVehicle() [2/2]

bool SCR_AIGroupUtilityComponent.IsUsableVehicle ( notnull SCR_AIVehicleUsageComponent vehicleUsageComp)

◆ JoinSubgroup()

void SCR_AIGroupUtilityComponent.JoinSubgroup ( AIAgent agent,
int handleId,
bool isSubgroupLeader )
protected

◆ LeaveSubgroup()

void SCR_AIGroupUtilityComponent.LeaveSubgroup ( AIAgent agent,
SCR_AIGroupVehicle groupVehicle )
protected

◆ OnAgentAdded()

void SCR_AIGroupUtilityComponent.OnAgentAdded ( AIAgent agent)

Updates info of group members to planner - should be called when adding or removing group member.

Parameters
[in]agent

◆ OnAgentCompartmentEntered()

void SCR_AIGroupUtilityComponent.OnAgentCompartmentEntered ( AIAgent agent,
IEntity targetEntity,
BaseCompartmentManagerComponent manager,
int mgrID,
int slotID,
bool move )
protected

◆ OnAgentCompartmentLeft()

void SCR_AIGroupUtilityComponent.OnAgentCompartmentLeft ( AIAgent agent,
IEntity targetEntity,
BaseCompartmentManagerComponent manager,
int mgrID,
int slotID,
bool move )
protected

◆ OnAgentLifeStateChanged()

void SCR_AIGroupUtilityComponent.OnAgentLifeStateChanged ( AIAgent incapacitatedAgent,
SCR_AIInfoComponent infoIncap,
IEntity vehicle,
ECharacterLifeState lifeState )

◆ OnAgentRemoved()

void SCR_AIGroupUtilityComponent.OnAgentRemoved ( SCR_AIGroup group,
AIAgent agent )
Parameters
[in]group
[in]agent

◆ OnCurrentWaypointChanged()

void SCR_AIGroupUtilityComponent.OnCurrentWaypointChanged ( AIWaypoint currentWp,
AIWaypoint prevWp )
Parameters
[in]currentWp
[in]prevWp

◆ OnEnemyDetectedFiltered()

void SCR_AIGroupUtilityComponent.OnEnemyDetectedFiltered ( SCR_AIGroup group,
SCR_AITargetInfo target,
AIAgent reporter )

Called from m_Perception.

◆ OnExecuteWaypointTree()

void SCR_AIGroupUtilityComponent.OnExecuteWaypointTree ( )

◆ OnJoinGroupFromVehicle()

bool SCR_AIGroupUtilityComponent.OnJoinGroupFromVehicle ( AIAgent agent,
bool isDriving )
protected

◆ OnMoveFailed()

void SCR_AIGroupUtilityComponent.OnMoveFailed ( int moveResult,
IEntity vehicleUsed,
bool isWaypointRelated,
vector moveLocation )

◆ OnTargetClusterStateChanged()

void SCR_AIGroupUtilityComponent.OnTargetClusterStateChanged ( SCR_AITargetClusterState state,
EAITargetClusterState prevState,
EAITargetClusterState newState )
Parameters
[in]state
[in]prevState
[in]newState

◆ OnVehicleDamageStateChanged()

void SCR_AIGroupUtilityComponent.OnVehicleDamageStateChanged ( SCR_AIVehicleUsageComponent comp,
EDamageState state )
protected

◆ OnVehicleDeleted()

void SCR_AIGroupUtilityComponent.OnVehicleDeleted ( SCR_AIVehicleUsageComponent comp)
protected

◆ OnWaypointCompleted()

void SCR_AIGroupUtilityComponent.OnWaypointCompleted ( AIWaypoint waypoint)
Parameters
[in]waypoint

◆ OnWaypointRemoved()

void SCR_AIGroupUtilityComponent.OnWaypointRemoved ( AIWaypoint waypoint,
bool isCurrentWaypoint )
Parameters
[in]waypoint
[in]isCurrentWaypoint

◆ RemoveUsableVehicle()

void SCR_AIGroupUtilityComponent.RemoveUsableVehicle ( notnull SCR_AIVehicleUsageComponent vehicleUsageComp)

◆ SetCombatMode()

void SCR_AIGroupUtilityComponent.SetCombatMode ( EAIGroupCombatMode combatMode)

Sets combat mode as desired by external means, such as scenario, or commanding, or game master.

◆ SetFireRateCoef()

void SCR_AIGroupUtilityComponent.SetFireRateCoef ( float coef = 1,
bool overridePersistent = false )

◆ SetMaxAutonomousDistance()

void SCR_AIGroupUtilityComponent.SetMaxAutonomousDistance ( float dist)

Sets max distance for various autonomous behaviors.

◆ ShouldSuppressCluster()

bool SCR_AIGroupUtilityComponent.ShouldSuppressCluster ( SCR_AITargetClusterState clusterState)
protected

◆ UpdateClustersState()

void SCR_AIGroupUtilityComponent.UpdateClustersState ( float deltaTime_ms)

Iterates all clusters and updates their state.

Parameters
[in]deltaTime_ms

◆ UpdateGroupControlMode()

void SCR_AIGroupUtilityComponent.UpdateGroupControlMode ( SCR_AIActionBase currentAction)
Parameters
[in]currentAction

◆ UpdateSuppressCluster()

void SCR_AIGroupUtilityComponent.UpdateSuppressCluster ( )
protected

◆ UpdateThreatMeasure()

void SCR_AIGroupUtilityComponent.UpdateThreatMeasure ( )
protected

Member Data Documentation

◆ AUTONOMOUS_DISTANCE_MAX_DEFAULT

const float SCR_AIGroupUtilityComponent.AUTONOMOUS_DISTANCE_MAX_DEFAULT = 9999
staticprotected

◆ m_aInfoComponents

ref array<SCR_AIInfoComponent> SCR_AIGroupUtilityComponent.m_aInfoComponents = {}

◆ m_bNewGroupMemberAdded

bool SCR_AIGroupUtilityComponent.m_bNewGroupMemberAdded
protected

◆ m_ConfigComponent

SCR_AIConfigComponent SCR_AIGroupUtilityComponent.m_ConfigComponent

◆ m_CurrentActivity

ref SCR_AIActionBase SCR_AIGroupUtilityComponent.m_CurrentActivity
protected

◆ m_CurrentSuppressClusterState

ref SCR_AITargetClusterState SCR_AIGroupUtilityComponent.m_CurrentSuppressClusterState
protected

◆ m_eCombatModeActual

EAIGroupCombatMode SCR_AIGroupUtilityComponent.m_eCombatModeActual = EAIGroupCombatMode.FIRE_AT_WILL
protected

◆ m_eCombatModeExternal

EAIGroupCombatMode SCR_AIGroupUtilityComponent.m_eCombatModeExternal = EAIGroupCombatMode.FIRE_AT_WILL
protected

◆ m_fFireRateCoef

float SCR_AIGroupUtilityComponent.m_fFireRateCoef = 1
protected

◆ m_FireteamMgr

ref SCR_AIGroupFireteamManager SCR_AIGroupUtilityComponent.m_FireteamMgr

◆ m_fLastUpdateTime

float SCR_AIGroupUtilityComponent.m_fLastUpdateTime = -1.0
protected

◆ m_fMaxAutonomousDistance

float SCR_AIGroupUtilityComponent.m_fMaxAutonomousDistance = AUTONOMOUS_DISTANCE_MAX_DEFAULT
protected

◆ m_fPerceptionUpdateTimer_ms

float SCR_AIGroupUtilityComponent.m_fPerceptionUpdateTimer_ms
protected

◆ m_fThreatMeasure

float SCR_AIGroupUtilityComponent.m_fThreatMeasure
protected

◆ m_GroupInfo

SCR_AIGroupInfoComponent SCR_AIGroupUtilityComponent.m_GroupInfo

◆ m_GroupMovementComponent

SCR_AIGroupMovementComponent SCR_AIGroupUtilityComponent.m_GroupMovementComponent

◆ m_iGetMemberByGoalNextIndex

int SCR_AIGroupUtilityComponent.m_iGetMemberByGoalNextIndex = 0

◆ m_Mailbox

SCR_MailboxComponent SCR_AIGroupUtilityComponent.m_Mailbox

◆ m_OnAgentLifeStateChanged

ref ScriptInvokerBase<SCR_AIOnAgentLifeStateChanged> SCR_AIGroupUtilityComponent.m_OnAgentLifeStateChanged = new ScriptInvokerBase<SCR_AIOnAgentLifeStateChanged>()

◆ m_OnMoveFailed

ref ScriptInvoker_GroupMoveFailed SCR_AIGroupUtilityComponent.m_OnMoveFailed

◆ m_Owner

SCR_AIGroup SCR_AIGroupUtilityComponent.m_Owner

◆ m_Perception

ref SCR_AIGroupPerception SCR_AIGroupUtilityComponent.m_Perception

◆ m_SettingsComponent

SCR_AIGroupSettingsComponent SCR_AIGroupUtilityComponent.m_SettingsComponent

◆ m_TargetClusterProcessor

ref SCR_AIGroupTargetClusterProcessor SCR_AIGroupUtilityComponent.m_TargetClusterProcessor
protected

◆ m_VehicleMgr

ref SCR_AIGroupVehicleManager SCR_AIGroupUtilityComponent.m_VehicleMgr

◆ m_WaypointState

ref SCR_AIWaypointState SCR_AIGroupUtilityComponent.m_WaypointState
protected

◆ PERCEPTION_UPDATE_TIMER_MS

const float SCR_AIGroupUtilityComponent.PERCEPTION_UPDATE_TIMER_MS = 2000.0
staticprotected

◆ SUPPRESS_MAX_CLUSTER_INFO_AGE_S

const float SCR_AIGroupUtilityComponent.SUPPRESS_MAX_CLUSTER_INFO_AGE_S = 90
static

◆ SUPPRESS_MAX_DESTROYED_CLUSTER_INFO_AGE_S

const float SCR_AIGroupUtilityComponent.SUPPRESS_MAX_DESTROYED_CLUSTER_INFO_AGE_S = 10
static

◆ SUPPRESS_MAX_DIST_TO_CLUSTER_M

const float SCR_AIGroupUtilityComponent.SUPPRESS_MAX_DIST_TO_CLUSTER_M = 800
static

◆ SUPPRESS_MIN_DIST_TO_CLUSTER_M

const float SCR_AIGroupUtilityComponent.SUPPRESS_MIN_DIST_TO_CLUSTER_M = 30
static

◆ SUPPRESS_OLD_CLUSTER_INFO_AGE_S

const float SCR_AIGroupUtilityComponent.SUPPRESS_OLD_CLUSTER_INFO_AGE_S = 15
static

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