Arma Reforger Script API
|
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 () |
SCR_AIActionBase | EvaluateActivity (out bool restartActivity) |
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. | |
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 | EOnInit (IEntity owner) |
void | OnPostInit (IEntity owner) |
void | EOnDeactivate (IEntity owner) |
void | EOnDiag (IEntity owner, float timeSlice) |
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 |
ref array< SCR_AIInfoComponent > | m_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 |
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 |
Static Protected Attributes | |
static const float | AUTONOMOUS_DISTANCE_MAX_DEFAULT = 9999 |
const float | PERCEPTION_UPDATE_TIMER_MS = 2000.0 |
void SCR_AIGroupUtilityComponent.AddUsableVehicle | ( | notnull SCR_AIVehicleUsageComponent | vehicleUsageComp | ) |
bool SCR_AIGroupUtilityComponent.AnyMembersInsideBBox | ( | vector | bbMin, |
vector | bbMax | ||
) |
void SCR_AIGroupUtilityComponent.CancelActivitiesRelatedToWaypoint | ( | notnull AIWaypoint | waypoint, |
TypeName | activityType = TypeName::Empty |
||
) |
[in] | waypoint | |
[in] | activityType |
|
protected |
Determines when we can rebalance fireteams. We don't want to do that when fighting for example.
|
protected |
override void SCR_AIGroupUtilityComponent.EOnDiag | ( | IEntity | owner, |
float | timeSlice | ||
) |
Implements AIBaseUtilityComponent.
override void SCR_AIGroupUtilityComponent.EOnInit | ( | IEntity | owner | ) |
Implements AIBaseUtilityComponent.
SCR_AIActionBase SCR_AIGroupUtilityComponent.EvaluateActivity | ( | out bool | restartActivity | ) |
[out] | restartActivity |
void SCR_AIGroupUtilityComponent.EvaluateFlareUsage | ( | ) |
SCR_AITargetClusterState SCR_AIGroupUtilityComponent.GetCurrentSuppressClusterState | ( | ) |
float SCR_AIGroupUtilityComponent.GetFireRateCoef | ( | ) |
float SCR_AIGroupUtilityComponent.GetMaxAutonomousDistance | ( | ) |
ScriptInvoker_GroupMoveFailed SCR_AIGroupUtilityComponent.GetOnMoveFailed | ( | ) |
float SCR_AIGroupUtilityComponent.GetThreatMeasure | ( | ) |
bool SCR_AIGroupUtilityComponent.IsMilitary | ( | ) |
Are we a military AI or not?
bool SCR_AIGroupUtilityComponent.IsPositionAllowed | ( | vector | pos | ) |
Decides whether we are allowed to go to this position.
[in] | pos |
|
protected |
|
protected |
void SCR_AIGroupUtilityComponent.OnAgentAdded | ( | AIAgent | agent | ) |
Updates info of group members to planner - should be called when adding or removing group member.
[in] | agent |
|
protected |
|
protected |
void SCR_AIGroupUtilityComponent.OnAgentLifeStateChanged | ( | AIAgent | incapacitatedAgent, |
SCR_AIInfoComponent | infoIncap, | ||
IEntity | vehicle, | ||
ECharacterLifeState | lifeState | ||
) |
void SCR_AIGroupUtilityComponent.OnAgentRemoved | ( | SCR_AIGroup | group, |
AIAgent | agent | ||
) |
[in] | group | |
[in] | agent |
void SCR_AIGroupUtilityComponent.OnCurrentWaypointChanged | ( | AIWaypoint | currentWp, |
AIWaypoint | prevWp | ||
) |
[in] | currentWp | |
[in] | prevWp |
void SCR_AIGroupUtilityComponent.OnEnemyDetectedFiltered | ( | SCR_AIGroup | group, |
SCR_AITargetInfo | target, | ||
AIAgent | reporter | ||
) |
Called from m_Perception.
void SCR_AIGroupUtilityComponent.OnExecuteWaypointTree | ( | ) |
|
protected |
void SCR_AIGroupUtilityComponent.OnMoveFailed | ( | int | moveResult, |
IEntity | vehicleUsed, | ||
bool | isWaypointRelated, | ||
vector | moveLocation | ||
) |
void SCR_AIGroupUtilityComponent.OnTargetClusterStateChanged | ( | SCR_AITargetClusterState | state, |
EAITargetClusterState | prevState, | ||
EAITargetClusterState | newState | ||
) |
[in] | state | |
[in] | prevState | |
[in] | newState |
|
protected |
|
protected |
void SCR_AIGroupUtilityComponent.OnWaypointCompleted | ( | AIWaypoint | waypoint | ) |
[in] | waypoint |
void SCR_AIGroupUtilityComponent.OnWaypointRemoved | ( | AIWaypoint | waypoint, |
bool | isCurrentWaypoint | ||
) |
[in] | waypoint | |
[in] | isCurrentWaypoint |
void SCR_AIGroupUtilityComponent.RemoveUsableVehicle | ( | notnull SCR_AIVehicleUsageComponent | vehicleUsageComp | ) |
void SCR_AIGroupUtilityComponent.SetFireRateCoef | ( | float | coef = 1 , |
bool | overridePersistent = false |
||
) |
void SCR_AIGroupUtilityComponent.SetMaxAutonomousDistance | ( | float | dist | ) |
Sets max distance for various autonomous behaviors.
|
protected |
void SCR_AIGroupUtilityComponent.UpdateClustersState | ( | float | deltaTime_ms | ) |
Iterates all clusters and updates their state.
[in] | deltaTime_ms |
void SCR_AIGroupUtilityComponent.UpdateGroupControlMode | ( | SCR_AIActionBase | currentAction | ) |
[in] | currentAction |
|
protected |
|
protected |
|
staticprotected |
ref array<SCR_AIInfoComponent> SCR_AIGroupUtilityComponent.m_aInfoComponents = {} |
|
protected |
SCR_AIConfigComponent SCR_AIGroupUtilityComponent.m_ConfigComponent |
|
protected |
|
protected |
|
protected |
ref SCR_AIGroupFireteamManager SCR_AIGroupUtilityComponent.m_FireteamMgr |
|
protected |
|
protected |
|
protected |
|
protected |
SCR_AIGroupInfoComponent SCR_AIGroupUtilityComponent.m_GroupInfo |
SCR_AIGroupMovementComponent SCR_AIGroupUtilityComponent.m_GroupMovementComponent |
int SCR_AIGroupUtilityComponent.m_iGetMemberByGoalNextIndex = 0 |
SCR_MailboxComponent SCR_AIGroupUtilityComponent.m_Mailbox |
ref ScriptInvokerBase<SCR_AIOnAgentLifeStateChanged> SCR_AIGroupUtilityComponent.m_OnAgentLifeStateChanged = new ScriptInvokerBase<SCR_AIOnAgentLifeStateChanged>() |
ref ScriptInvoker_GroupMoveFailed SCR_AIGroupUtilityComponent.m_OnMoveFailed |
SCR_AIGroup SCR_AIGroupUtilityComponent.m_Owner |
ref SCR_AIGroupPerception SCR_AIGroupUtilityComponent.m_Perception |
|
protected |
ref SCR_AIGroupVehicleManager SCR_AIGroupUtilityComponent.m_VehicleMgr |
|
protected |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |