|
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 () |
| 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 | 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, bool doNotCompleteWaypoint=false) |
| 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 AIActionBase | GetCurrentAction () |
| proto external void | SetCurrentAction (AIActionBase executed) |
| proto external 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 Member Functions inherited from AIComponent | |
| proto external AIAgent | GetAIAgent () |
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_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 | |
| static const float | AUTONOMOUS_DISTANCE_MAX_DEFAULT = 9999 |
| 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 | 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 | OnWaypointToRemove (AIWaypoint waypoint, bool isCurrentWaypoint) |
| 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) |
| void | OnAgentLifeStateChanged (AIAgent incapacitatedAgent, SCR_AIInfoComponent infoIncap, IEntity vehicle, ECharacterLifeState lifeState) |
| void | OnCurrentWaypointChanged (AIWaypoint currentWp, AIWaypoint prevWp) |
| 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 | |
| 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, | ||
| bool | doNotCompleteWaypoint = false ) |
| [in] | waypoint | |
| [in] | activityType | |
| [in] | doNotCompleteWaypoint |
|
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.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.
| void SCR_AIGroupUtilityComponent.EvaluateFlareUsage | ( | ) |
| EAIGroupCombatMode SCR_AIGroupUtilityComponent.GetCombatModeActual | ( | ) |
Returns actual combat mode. See comment to EvaluateCombatMode method.
| EAIGroupCombatMode SCR_AIGroupUtilityComponent.GetCombatModeExternal | ( | ) |
See SetCombatMode.
| 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 |
| bool SCR_AIGroupUtilityComponent.IsUsableVehicle | ( | notnull IEntity | vehicleEntity | ) |
| bool SCR_AIGroupUtilityComponent.IsUsableVehicle | ( | notnull SCR_AIVehicleUsageComponent | vehicleUsageComp | ) |
|
protected |
|
protected |
|
protected |
Updates info of group members to planner - should be called when adding or removing group member.
| [in] | agent |
|
protected |
|
protected |
|
protected |
|
protected |
| [in] | group | |
| [in] | agent |
|
protected |
| [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 |
|
protected |
| [in] | waypoint |
|
protected |
| [in] | waypoint | |
| [in] | isCurrentWaypoint |
| void SCR_AIGroupUtilityComponent.RemoveUsableVehicle | ( | notnull SCR_AIVehicleUsageComponent | vehicleUsageComp | ) |
| void SCR_AIGroupUtilityComponent.SetCombatMode | ( | EAIGroupCombatMode | combatMode | ) |
Sets combat mode as desired by external means, such as scenario, or commanding, or game master.
| 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 |
|
static |
| ref array<SCR_AIInfoComponent> SCR_AIGroupUtilityComponent.m_aInfoComponents = {} |
|
protected |
| SCR_AIConfigComponent SCR_AIGroupUtilityComponent.m_ConfigComponent |
|
protected |
|
protected |
|
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 |
| SCR_AIGroupSettingsComponent SCR_AIGroupUtilityComponent.m_SettingsComponent |
|
protected |
| ref SCR_AIGroupVehicleManager SCR_AIGroupUtilityComponent.m_VehicleMgr |
|
protected |
|
staticprotected |
|
static |
|
static |
|
static |
|
static |
|
static |