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_AIMoveActivity.c
Go to the documentation of this file.
1
class
SCR_AIMoveActivity
:
SCR_AIActivityBase
2
{
3
protected
static
const
string
MOVEMENT_TYPE_PORT
=
"MovementType"
;
4
5
ref SCR_BTParamAssignable<vector>
m_vPosition
=
new
SCR_BTParamAssignable<vector>(
SCR_AIActionTask
.POSITION_PORT);
6
ref SCR_BTParam<IEntity>
m_Entity
=
new
SCR_BTParam<IEntity>(
SCR_AIActionTask
.ENTITY_PORT);
7
ref SCR_BTParam<bool>
m_bUseVehicles
=
new
SCR_BTParam<bool>(
SCR_AIActionTask
.USE_VEHICLES_PORT);
8
ref SCR_BTParam<EMovementType>
m_eMovementType
=
new
SCR_BTParam<EMovementType>(
MOVEMENT_TYPE_PORT
);
9
10
//------------------------------------------------------------------------------------------------
11
void
InitParameters
(
vector
position
,
IEntity
entity,
EMovementType
movementType,
bool
useVehicles,
float
priorityLevel)
12
{
13
m_vPosition
.Init(
this
,
position
);
14
m_vPosition
.m_AssignedOut = (
position
!=
vector
.Zero);
15
m_Entity
.Init(
this
, entity);
16
m_bUseVehicles
.Init(
this
, useVehicles);
17
m_eMovementType
.Init(
this
, movementType);
18
m_fPriorityLevel
.Init(
this
, priorityLevel);
19
}
20
21
//------------------------------------------------------------------------------------------------
22
void
SCR_AIMoveActivity
(
SCR_AIGroupUtilityComponent
utility, AIWaypoint relatedWaypoint,
vector
pos,
IEntity
ent,
EMovementType
movementType =
EMovementType
.RUN,
bool
useVehicles =
true
,
float
priority = PRIORITY_ACTIVITY_MOVE,
float
priorityLevel =
PRIORITY_LEVEL_NORMAL
)
23
{
24
InitParameters
(pos, ent, movementType, useVehicles, priorityLevel);
25
m_sBehaviorTree
=
"AI/BehaviorTrees/Chimera/Group/ActivityMove.bt"
;
26
SetPriority(priority);
27
}
28
29
//------------------------------------------------------------------------------------------------
30
override
float
CustomEvaluate
()
31
{
32
if
(
m_Utility
.HasActionOfType(
SCR_AIHealActivity
))
33
return
0;
34
35
return
GetPriority
();
36
}
37
38
//------------------------------------------------------------------------------------------------
39
override
string
GetActionDebugInfo
()
40
{
41
return
this.
ToString
() +
" moving to "
+ m_vPosition.m_Value.ToString();
42
}
43
44
//------------------------------------------------------------------------------------------------
45
override
void
OnActionCompleted
()
46
{
47
super.OnActionCompleted();
48
if
(
m_bUseVehicles
.m_Value)
49
{
50
SCR_AIGroup
group =
SCR_AIGroup
.Cast(
m_Utility
.GetAIAgent());
51
if
(!group)
52
return
;
53
group.
ReleaseCompartments
();
54
}
55
SendCancelMessagesToAllAgents
();
56
}
57
58
//------------------------------------------------------------------------------------------------
59
override
void
OnActionFailed
()
60
{
61
super.OnActionFailed();
62
if
(
m_bUseVehicles
.m_Value)
63
{
64
SCR_AIGroup
group =
SCR_AIGroup
.Cast(
m_Utility
.GetAIAgent());
65
if
(!group)
66
return
;
67
group.
ReleaseCompartments
();
68
}
69
SendCancelMessagesToAllAgents
();
70
}
71
72
//------------------------------------------------------------------------------------------------
73
override
void
OnActionDeselected
()
74
{
75
super.OnActionDeselected();
76
SendCancelMessagesToAllAgents
();
77
}
78
};
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
position
vector position
Definition
SCR_DestructibleTreeV2.c:30
IEntity
Definition
IEntity.c:13
SCR_AIActionTask
Definition
SCR_AIBehaviorTask.c:2
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::ReleaseCompartments
void ReleaseCompartments()
Definition
SCR_AIGroup.c:2024
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
SCR_AIHealActivity
Definition
SCR_AIHealActivity.c:2
SCR_AIMoveActivity::m_vPosition
ref SCR_BTParamAssignable< vector > m_vPosition
Definition
SCR_AIMoveActivity.c:5
SCR_AIMoveActivity::OnActionDeselected
override void OnActionDeselected()
Definition
SCR_AIMoveActivity.c:73
SCR_AIMoveActivity::m_eMovementType
ref SCR_BTParam< EMovementType > m_eMovementType
Definition
SCR_AIMoveActivity.c:8
SCR_AIMoveActivity::CustomEvaluate
override float CustomEvaluate()
Definition
SCR_AIMoveActivity.c:30
SCR_AIMoveActivity::GetActionDebugInfo
override string GetActionDebugInfo()
Definition
SCR_AIMoveActivity.c:39
SCR_AIMoveActivity::m_Entity
ref SCR_BTParam< IEntity > m_Entity
Definition
SCR_AIMoveActivity.c:6
SCR_AIMoveActivity::SCR_AIMoveActivity
void SCR_AIMoveActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, vector pos, IEntity ent, EMovementType movementType=EMovementType.RUN, bool useVehicles=true, float priority=PRIORITY_ACTIVITY_MOVE, float priorityLevel=PRIORITY_LEVEL_NORMAL)
Definition
SCR_AIMoveActivity.c:22
SCR_AIMoveActivity::OnActionFailed
override void OnActionFailed()
Definition
SCR_AIMoveActivity.c:59
SCR_AIMoveActivity::m_bUseVehicles
ref SCR_BTParam< bool > m_bUseVehicles
Definition
SCR_AIMoveActivity.c:7
SCR_AIMoveActivity::InitParameters
void InitParameters(vector position, IEntity entity, EMovementType movementType, bool useVehicles, float priorityLevel)
Definition
SCR_AIMoveActivity.c:11
SCR_AIMoveActivity::MOVEMENT_TYPE_PORT
static const string MOVEMENT_TYPE_PORT
Definition
SCR_AIMoveActivity.c:3
SCR_AIMoveActivity::OnActionCompleted
override void OnActionCompleted()
Definition
SCR_AIMoveActivity.c:45
vector
Definition
vector.c:13
EMovementType
EMovementType
Definition
EMovementType.c:13
GetPriority
int GetPriority()
Definition
SCR_BaseManualCameraComponent.c:247
ToString
proto external string ToString()
Plain C++ pointer, no weak pointers, no memory management.
scripts
Game
AI
Behavior
SCR_AIMoveActivity.c
Generated by
1.17.0