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_AIGetInActivity.c
Go to the documentation of this file.
1
class
SCR_AIGetInActivity
:
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
ref SCR_BTParam<ECompartmentType> m_eRoleInVehicle =
new
SCR_BTParam<ECompartmentType>(
SCR_AIActionTask
.ROLEINVEHICLE_PORT);
6
protected
SCR_AIGroup
m_OwnerGroup
;
7
8
void
InitParameters
(
IEntity
vehicle,
SCR_AIBoardingParameters
parameters,
ECompartmentType
role,
float
priorityLevel)
9
{
10
m_Vehicle.Init(
this
, vehicle);
11
m_BoardingParameters.Init(
this
, parameters);
12
m_eRoleInVehicle.Init(
this
, role);
13
m_fPriorityLevel
.Init(
this
, priorityLevel);
14
}
15
16
//------------------------------------------------------------------------------------------------
17
void
SCR_AIGetInActivity
(
SCR_AIGroupUtilityComponent
utility, AIWaypoint relatedWaypoint,
IEntity
vehicle,
SCR_AIBoardingParameters
boardingParameters = null,
ECompartmentType
role =
ECompartmentType
.CARGO,
float
priority = PRIORITY_ACTIVITY_GET_IN,
float
priorityLevel =
PRIORITY_LEVEL_NORMAL
)
18
{
19
InitParameters
(vehicle, boardingParameters, role, priorityLevel);
20
m_sBehaviorTree
=
"AI/BehaviorTrees/Chimera/Group/ActivityGetIn.bt"
;
21
SetPriority(priority);
22
if
(utility)
23
m_OwnerGroup
= utility.m_Owner;
24
}
25
26
//------------------------------------------------------------------------------------------------
27
override
string
GetActionDebugInfo
()
28
{
29
return
this.
ToString
() +
" moving to "
+ m_Vehicle.m_Value.ToString() +
" as "
+ m_eRoleInVehicle.m_Value.ToString();
30
}
31
32
//------------------------------------------------------------------------------------------------
33
override
void
OnActionDeselected
()
34
{
35
m_OwnerGroup
.ReleaseCompartments();
36
super.OnActionDeselected();
37
}
38
39
//------------------------------------------------------------------------------------------------
40
override
void
OnActionSelected
()
41
{
42
if
(m_Vehicle.m_Value)
43
{
44
SCR_AIVehicleUsageComponent
vehicleUsageComp =
SCR_AIVehicleUsageComponent
.
FindOnNearestParent
(m_Vehicle.m_Value, m_Vehicle.m_Value);
45
if
(vehicleUsageComp)
46
m_Utility
.AddUsableVehicle(vehicleUsageComp);
47
}
48
49
super.OnActionDeselected();
50
}
51
52
//------------------------------------------------------------------------------------------------
53
override
void
OnActionCompleted
()
54
{
55
super.OnActionCompleted();
56
if
(
m_RelatedWaypoint
)
57
m_OwnerGroup
.CompleteWaypoint(
m_RelatedWaypoint
);
58
}
59
60
//------------------------------------------------------------------------------------------------
61
override
void
OnActionFailed
()
62
{
63
super.OnActionFailed();
64
SendCancelMessagesToAllAgents
();
65
66
if
(m_Vehicle.m_Value)
67
{
68
SCR_AIVehicleUsageComponent
vehicleUsageComp =
SCR_AIVehicleUsageComponent
.
FindOnNearestParent
(m_Vehicle.m_Value, m_Vehicle.m_Value);
69
if
(vehicleUsageComp)
70
m_Utility
.RemoveUsableVehicle(vehicleUsageComp);
71
}
72
73
if
(
m_RelatedWaypoint
)
74
m_OwnerGroup
.CompleteWaypoint(
m_RelatedWaypoint
);
75
}
76
77
//------------------------------------------------------------------------------------------------
78
void
ClearActivityVehicle
()
79
{
80
m_Vehicle.m_Value = null;
81
}
82
};
ECompartmentType
ECompartmentType
Definition
ECompartmentType.c:8
m_fPriorityLevel
ref SCR_BTParam< float > m_fPriorityLevel
Definition
SCR_AIAction.c:87
PRIORITY_LEVEL_NORMAL
enum EAIActionFailReason PRIORITY_LEVEL_NORMAL
m_sBehaviorTree
ResourceName m_sBehaviorTree
Definition
SCR_AIAction.c:89
SendCancelMessagesToAllAgents
void SendCancelMessagesToAllAgents()
Definition
SCR_AIActivity.c:51
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_AIGetInActivity::OnActionCompleted
override void OnActionCompleted()
Definition
SCR_AIGetInActivity.c:53
SCR_AIGetInActivity::GetActionDebugInfo
override string GetActionDebugInfo()
Definition
SCR_AIGetInActivity.c:27
SCR_AIGetInActivity::InitParameters
void InitParameters(IEntity vehicle, SCR_AIBoardingParameters parameters, ECompartmentType role, float priorityLevel)
Definition
SCR_AIGetInActivity.c:8
SCR_AIGetInActivity::m_OwnerGroup
SCR_AIGroup m_OwnerGroup
Definition
SCR_AIGetInActivity.c:6
SCR_AIGetInActivity::OnActionSelected
override void OnActionSelected()
Definition
SCR_AIGetInActivity.c:40
SCR_AIGetInActivity::OnActionDeselected
override void OnActionDeselected()
Definition
SCR_AIGetInActivity.c:33
SCR_AIGetInActivity::OnActionFailed
override void OnActionFailed()
Definition
SCR_AIGetInActivity.c:61
SCR_AIGetInActivity::ClearActivityVehicle
void ClearActivityVehicle()
Definition
SCR_AIGetInActivity.c:78
SCR_AIGetInActivity::SCR_AIGetInActivity
void SCR_AIGetInActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, IEntity vehicle, SCR_AIBoardingParameters boardingParameters=null, ECompartmentType role=ECompartmentType.CARGO, float priority=PRIORITY_ACTIVITY_GET_IN, float priorityLevel=PRIORITY_LEVEL_NORMAL)
Definition
SCR_AIGetInActivity.c:17
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
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_AIGetInActivity.c
Generated by
1.17.0