Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_AIGetOutActivity.c
Go to the documentation of this file.
1
class
SCR_AIGetOutActivity :
SCR_AIActivityBase
2
{
3
ref SCR_BTParam<IEntity> m_Vehicle =
new
SCR_BTParam<IEntity>(
SCR_AIActionTask
.ENTITY_PORT);
4
ref SCR_BTParam<SCR_AIBoardingParameters> m_BoardingParameters =
new
SCR_BTParam<SCR_AIBoardingParameters>(
SCR_AIActionTask
.BOARDING_PARAMS_PORT);
5
6
//-----------------------------------------------------------------------------------------------------------------------------------
7
void
InitParameters(
IEntity
vehicle,
SCR_AIBoardingParameters
boardingParameters,
float
priorityLevel)
8
{
9
m_Vehicle.Init(
this
, vehicle);
10
m_fPriorityLevel
.Init(
this
, priorityLevel);
11
m_BoardingParameters.Init(
this
, boardingParameters);
12
}
13
14
//-----------------------------------------------------------------------------------------------------------------------------------
15
void
SCR_AIGetOutActivity(
SCR_AIGroupUtilityComponent
utility, AIWaypoint relatedWaypoint,
IEntity
vehicle,
SCR_AIBoardingParameters
boardingParameters = null,
float
priority = PRIORITY_ACTIVITY_GET_OUT,
float
priorityLevel =
PRIORITY_LEVEL_NORMAL
)
16
{
17
InitParameters(vehicle, boardingParameters, priorityLevel);
18
19
m_sBehaviorTree
=
"AI/BehaviorTrees/Chimera/Group/ActivityGetOut.bt"
;
20
SetPriority(priority);
21
}
22
23
//-----------------------------------------------------------------------------------------------------------------------------------
24
override
void
OnActionCompleted
()
25
{
26
if
(
m_RelatedWaypoint
)
27
m_Utility
.m_Owner.CompleteWaypoint(
m_RelatedWaypoint
);
28
if
(m_Vehicle.m_Value)
29
{
30
SCR_AIVehicleUsageComponent
vehicleUsageComp =
SCR_AIVehicleUsageComponent
.
FindOnNearestParent
(m_Vehicle.m_Value, m_Vehicle.m_Value);
31
if
(vehicleUsageComp)
32
m_Utility
.m_VehicleMgr.RemoveVehicle(vehicleUsageComp);
33
}
34
else
35
{
36
array<ref SCR_AIGroupVehicle> groupVehicles = {};
37
m_Utility
.m_VehicleMgr.GetAllVehicles(groupVehicles);
38
foreach
(
SCR_AIGroupVehicle
vehicle : groupVehicles)
39
m_Utility
.m_VehicleMgr.RemoveVehicle(vehicle.GetVehicleUsageComponent());
40
}
41
super.OnActionCompleted();
42
}
43
44
//-----------------------------------------------------------------------------------------------------------------------------------
45
override
string
GetActionDebugInfo
()
46
{
47
string
vehicleRef;
48
if
(!m_Vehicle.m_Value)
49
vehicleRef =
"all vehicles"
;
50
else
51
vehicleRef = m_Vehicle.m_Value.ToString();
52
return
this.
ToString
() +
" leaving "
+ vehicleRef;
53
}
54
};
55
m_fPriorityLevel
ref SCR_BTParam< float > m_fPriorityLevel
Definition
SCR_AIAction.c:87
OnActionCompleted
void OnActionCompleted()
Definition
SCR_AIAction.c:202
PRIORITY_LEVEL_NORMAL
enum EAIActionFailReason PRIORITY_LEVEL_NORMAL
m_sBehaviorTree
ResourceName m_sBehaviorTree
Definition
SCR_AIAction.c:89
GetActionDebugInfo
string GetActionDebugInfo()
Definition
SCR_AIAction.c:185
SCR_AIActivityBase
void SCR_AIActivityBase(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint)
Definition
SCR_AIActivity.c:44
m_Utility
enum SCR_EAIActivityCause m_Utility
m_RelatedWaypoint
AIWaypoint m_RelatedWaypoint
Definition
SCR_AIActivity.c:15
IEntity
Definition
IEntity.c:13
SCR_AIActionTask
Definition
SCR_AIBehaviorTask.c:2
SCR_AIBoardingParameters
Definition
SCR_BoardingWaypoint.c:6
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
SCR_AIGroupVehicle
This class is used for keeping track of vehicles assigned to group.
Definition
SCR_AIGroupVehicle.c:3
SCR_AIVehicleUsageComponent
Definition
SCR_AIVehicleUsageComponent.c:30
SCR_AIVehicleUsageComponent::FindOnNearestParent
static SCR_AIVehicleUsageComponent FindOnNearestParent(notnull IEntity ent, out IEntity componentOwner)
Definition
SCR_AIVehicleUsageComponent.c:140
ToString
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.
scripts
Game
AI
Behavior
SCR_AIGetOutActivity.c
Generated by
1.17.0