Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIWaypoint.c
Go to the documentation of this file.
4
5class 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
14
15 //------------------------------------------------------------------------------------------------
17 {
18 foreach (auto s : m_aSettings)
19 s.Internal_ConstructedAtProperty(SCR_EAISettingOrigin.WAYPOINT, SCR_EAISettingFlags.WAYPOINT);
20 }
21
22 //------------------------------------------------------------------------------------------------
24 {
25 return m_fPriorityLevel;
26 }
27
28 //------------------------------------------------------------------------------------------------
29 void SetPriorityLevel(float priority)
30 {
31 m_fPriorityLevel = priority;
32 }
33
34 //------------------------------------------------------------------------------------------------
36 {
37 return vector.DistanceXZ(GetOrigin(), pos) < GetCompletionRadius();
38 }
39
40 //------------------------------------------------------------------------------------------------
47
48 //------------------------------------------------------------------------------------------------
50 {
53 super.OnTransformResetImpl(params);
54 }
55
56 //------------------------------------------------------------------------------------------------
57 // Override this to create a custom waypoint state object.
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
vector GetOrigin()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvoker GetOnWaypointPropertiesChanged()
ref ScriptInvoker m_OnWaypointPropertiesChanged
void SCR_AIWaypoint(IEntitySource src, IEntity parent)
SCR_AIWaypointState CreateWaypointState(SCR_AIGroupUtilityComponent groupUtilityComp)
void SetPriorityLevel(float priority)
override void OnTransformResetImpl(TransformResetParams params)
bool IsWithinCompletionRadius(vector pos)
void RemoveSetting(notnull SCR_AISettingBase s)
void AddSetting(notnull SCR_AISettingBase s)
float GetPriorityLevel()
void GetSettings(notnull array< SCR_AISettingBase > outSettings)
ref array< ref SCR_AISettingBase > m_aSettings
proto external float GetCompletionRadius()
SCR_FieldOfViewSettings Attribute
ScriptInvokerBase< func > ScriptInvoker
Definition tools.c:134