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_AIWaypoint.c
Go to the documentation of this file.
1
class
SCR_AIWaypointClass
:
AIWaypointClass
2
{
3
};
4
5
class
SCR_AIWaypoint
: AIWaypoint
6
{
7
[
Attribute
(
"0"
,
UIWidgets
.SpinBox,
"Waypoint priority level"
,
"0 2000 1000"
)]
8
private
float
m_fPriorityLevel;
9
10
[
Attribute
(
desc
:
"Settings which are valid while this waypoint is active."
)]
11
protected
ref array<ref SCR_AISettingBase>
m_aSettings
;
12
13
protected
ref
ScriptInvoker
m_OnWaypointPropertiesChanged
;
14
15
//------------------------------------------------------------------------------------------------
16
void
SCR_AIWaypoint
(
IEntitySource
src,
IEntity
parent)
17
{
18
foreach
(
auto
s :
m_aSettings
)
19
s.Internal_ConstructedAtProperty(
SCR_EAISettingOrigin
.WAYPOINT, SCR_EAISettingFlags.WAYPOINT);
20
}
21
22
//------------------------------------------------------------------------------------------------
23
float
GetPriorityLevel
()
24
{
25
return
m_fPriorityLevel;
26
}
27
28
//------------------------------------------------------------------------------------------------
29
void
SetPriorityLevel
(
float
priority)
30
{
31
m_fPriorityLevel = priority;
32
}
33
34
//------------------------------------------------------------------------------------------------
35
bool
IsWithinCompletionRadius
(
vector
pos)
36
{
37
return
vector
.DistanceXZ(
GetOrigin
(), pos) <
GetCompletionRadius
();
38
}
39
40
//------------------------------------------------------------------------------------------------
41
ScriptInvoker
GetOnWaypointPropertiesChanged
()
42
{
43
if
(!
m_OnWaypointPropertiesChanged
)
44
m_OnWaypointPropertiesChanged
=
new
ScriptInvoker
();
45
return
m_OnWaypointPropertiesChanged
;
46
}
47
48
//------------------------------------------------------------------------------------------------
49
override
void
OnTransformResetImpl
(
TransformResetParams
params
)
50
{
51
if
(
m_OnWaypointPropertiesChanged
)
52
m_OnWaypointPropertiesChanged
.Invoke();
53
super.OnTransformResetImpl(
params
);
54
}
55
56
//------------------------------------------------------------------------------------------------
57
// Override this to create a custom waypoint state object.
58
SCR_AIWaypointState
CreateWaypointState
(
SCR_AIGroupUtilityComponent
groupUtilityComp)
59
{
60
return
new
SCR_AIWaypointState
(groupUtilityComp,
this
);
61
}
62
63
64
//----------------------------------------------------------------------------------------------------------------
65
// Operations with settings
66
67
//------------------------------------------------------------------------------------------------
71
void
AddSetting
(notnull SCR_AISettingBase s)
72
{
73
if
(
m_aSettings
.Contains(s))
74
return
;
75
76
s.Internal_SetFlag(SCR_EAISettingFlags.WAYPOINT);
77
m_aSettings
.Insert(s);
78
}
79
80
//------------------------------------------------------------------------------------------------
81
void
GetSettings
(notnull array<SCR_AISettingBase> outSettings)
82
{
83
outSettings.Clear();
84
85
foreach
(
auto
s :
m_aSettings
)
86
outSettings.Insert(s);
87
}
88
89
//------------------------------------------------------------------------------------------------
90
void
RemoveSetting
(notnull SCR_AISettingBase s)
91
{
92
m_aSettings
.RemoveItem(s);
93
}
94
};
SCR_EAISettingOrigin
SCR_EAISettingOrigin
Definition
SCR_AISetting.c:4
GetOrigin
vector GetOrigin()
Definition
SCR_AIUtilityComponent.c:471
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
AIWaypointClass
Definition
AIWaypoint.c:13
IEntity
Definition
IEntity.c:13
IEntitySource
Definition
IEntitySource.c:13
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
SCR_AIWaypointClass
Definition
SCR_AIWaypoint.c:2
SCR_AIWaypoint::GetOnWaypointPropertiesChanged
ScriptInvoker GetOnWaypointPropertiesChanged()
Definition
SCR_AIWaypoint.c:41
SCR_AIWaypoint::m_OnWaypointPropertiesChanged
ref ScriptInvoker m_OnWaypointPropertiesChanged
Definition
SCR_AIWaypoint.c:13
SCR_AIWaypoint::SCR_AIWaypoint
void SCR_AIWaypoint(IEntitySource src, IEntity parent)
Definition
SCR_AIWaypoint.c:16
SCR_AIWaypoint::CreateWaypointState
SCR_AIWaypointState CreateWaypointState(SCR_AIGroupUtilityComponent groupUtilityComp)
Definition
SCR_AIWaypoint.c:58
SCR_AIWaypoint::SetPriorityLevel
void SetPriorityLevel(float priority)
Definition
SCR_AIWaypoint.c:29
SCR_AIWaypoint::OnTransformResetImpl
override void OnTransformResetImpl(TransformResetParams params)
Definition
SCR_AIWaypoint.c:49
SCR_AIWaypoint::IsWithinCompletionRadius
bool IsWithinCompletionRadius(vector pos)
Definition
SCR_AIWaypoint.c:35
SCR_AIWaypoint::RemoveSetting
void RemoveSetting(notnull SCR_AISettingBase s)
Definition
SCR_AIWaypoint.c:90
SCR_AIWaypoint::AddSetting
void AddSetting(notnull SCR_AISettingBase s)
Definition
SCR_AIWaypoint.c:71
SCR_AIWaypoint::GetPriorityLevel
float GetPriorityLevel()
Definition
SCR_AIWaypoint.c:23
SCR_AIWaypoint::GetSettings
void GetSettings(notnull array< SCR_AISettingBase > outSettings)
Definition
SCR_AIWaypoint.c:81
SCR_AIWaypoint::m_aSettings
ref array< ref SCR_AISettingBase > m_aSettings
Definition
SCR_AIWaypoint.c:11
SCR_AIWaypointState
Definition
SCR_AIWaypointState.c:7
TransformResetParams
Definition
TransformResetParams.c:12
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
GetCompletionRadius
proto external float GetCompletionRadius()
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
ScriptInvoker
ScriptInvokerBase< func > ScriptInvoker
Definition
tools.c:134
scripts
Game
AI
Group
SCR_AIWaypoint.c
Generated by
1.17.0