Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkWaypoint.c
Go to the documentation of this file.
3{
4 //TODO: Request Autocomplete attribute to be exposed to script with getters and setters
5 //TODO: Request AI Behaviour Tree attribute to be exposed to script with getters and setters
6 //TODO: Request AI Behaviour Tree Move To attribute to be exposed to script with getters and setters
7
10
11 SCR_ScenarioFrameworkLayerBase m_SlotWaypoint;
12
13 //------------------------------------------------------------------------------------------------
15 void SetupWaypoint(IEntity waypointEntity)
16 {
17 AIWaypoint waypoint = AIWaypoint.Cast(waypointEntity);
18 if (!waypoint)
19 return;
20
21 waypoint.SetCompletionRadius(GetWaypointCompletionRadius());
22 waypoint.SetCompletionType(GetWaypointCompletionType());
23 }
24
25 //------------------------------------------------------------------------------------------------
27 void SetWaypointCompletionRadius(float radius)
28 {
29 }
30
31 //------------------------------------------------------------------------------------------------
33 float GetWaypointCompletionRadius()
34 {
35 return 10;
36 }
37
38 //------------------------------------------------------------------------------------------------
40 void SetWaypointCompletionType(EAIWaypointCompletionType type)
41 {
42 }
43
44 //------------------------------------------------------------------------------------------------
46 EAIWaypointCompletionType GetWaypointCompletionType()
47 {
49 }
50
51 //------------------------------------------------------------------------------------------------
53 void SetWaypointPrefab(ResourceName prefab)
54 {
55 }
56
57 //------------------------------------------------------------------------------------------------
59 ResourceName GetWaypointPrefab()
60 {
61 return string.Empty;
62 }
63}
64
65
67class SCR_ScenarioFrameworkWaypointScripted : SCR_ScenarioFrameworkWaypoint
68{
69 [Attribute(desc: "Settings which are valid while this waypoint is active.")]
70 protected ref array<ref SCR_AISettingBase> m_aSettings;
71
72 //------------------------------------------------------------------------------------------------
73 void SCR_ScenarioFrameworkWaypointScripted()
74 {
75 // Init all settings, they must have proper origin value
76 foreach (auto s : m_aSettings)
77 s.Internal_ConstructedAtProperty(SCR_EAISettingOrigin.SCENARIO, SCR_EAISettingFlags.SCENARIO_FRAMEWORK);
78 }
79
80 //------------------------------------------------------------------------------------------------
81 override void SetupWaypoint(IEntity waypointEntity)
82 {
83 super.SetupWaypoint(waypointEntity);
84
85 SCR_AIWaypoint waypointScripted = SCR_AIWaypoint.Cast(waypointEntity);
86 if (!waypointScripted)
87 return;
88
89 waypointScripted.SetPriorityLevel(GetWaypointPriorityLevel());
90
91 // Add settings
92 foreach (auto s : m_aSettings)
93 waypointScripted.AddSetting(s);
94 }
95
96 //------------------------------------------------------------------------------------------------
98 void SetWaypointPriorityLevel(float priority)
99 {
100 }
101
102 //------------------------------------------------------------------------------------------------
104 float GetWaypointPriorityLevel()
105 {
106 return 0;
107 }
108}
109
110
112class SCR_ScenarioFrameworkWaypointSmartAction : SCR_ScenarioFrameworkWaypointScripted
113{
114 [Attribute(desc: "Static reference to entity with smart action")]
115 string m_sStaticEntityName;
116
117 //------------------------------------------------------------------------------------------------
118 override void SetupWaypoint(IEntity waypointEntity)
119 {
120 super.SetupWaypoint(waypointEntity);
121
122 SCR_SmartActionWaypoint waypointSmartAction = SCR_SmartActionWaypoint.Cast(waypointEntity);
123 if (!waypointSmartAction)
124 return;
125
126 waypointSmartAction.m_sSmartActionTag = GetWaypointSmartActionTag();
127 waypointSmartAction.m_sStaticEntityName = m_sStaticEntityName;
128 }
129
130 //------------------------------------------------------------------------------------------------
132 void SetWaypointSmartActionTag(string tag)
133 {
134 }
135
136 //------------------------------------------------------------------------------------------------
138 string GetWaypointSmartActionTag()
139 {
140 return string.Empty;
141 }
142}
143
144
146class SCR_ScenarioFrameworkWaypointEntity : SCR_ScenarioFrameworkWaypointScripted
147{
148 [Attribute(desc: "Related entity")]
149 string m_sEntityName;
150
151 //------------------------------------------------------------------------------------------------
152 override void SetupWaypoint(IEntity waypointEntity)
153 {
154 super.SetupWaypoint(waypointEntity);
155
156 SCR_EntityWaypoint waypointScriptedEntity = SCR_EntityWaypoint.Cast(waypointEntity);
157 if (!waypointScriptedEntity)
158 return;
159
160 waypointScriptedEntity.SetEntityName(m_sEntityName);
161 }
162}
163
164
166class SCR_ScenarioFrameworkWaypointTimed : SCR_ScenarioFrameworkWaypointScripted
167{
168 //------------------------------------------------------------------------------------------------
169 override void SetupWaypoint(IEntity waypointEntity)
170 {
171 super.SetupWaypoint(waypointEntity);
172
173 SCR_TimedWaypoint waypointTimed = SCR_TimedWaypoint.Cast(waypointEntity);
174 if (!waypointTimed)
175 return;
176
177 waypointTimed.SetHoldingTime(GetWaypointHoldingTime());
178 }
179
180 //------------------------------------------------------------------------------------------------
182 void SetWaypointHoldingTime(float time)
183 {
184 }
185
186 //------------------------------------------------------------------------------------------------
188 float GetWaypointHoldingTime()
189 {
190 return 0;
191 }
192}
193
194
196class SCR_ScenarioFrameworkWaypointTimedDefend : SCR_ScenarioFrameworkWaypointTimed
197{
198 [Attribute("0", UIWidgets.Object, "If enabled, it will clear default Defend presets that are on prefab. There has to be at least one Preset set afterwards in order for this Waypoint to work.")]
199 bool m_bClearDefaultDefendPresets;
200
201 [Attribute("", UIWidgets.Object, "Defend presets that will be added to the waypoint")];
202 ref array<ref SCR_DefendWaypointPreset> m_aDefendPresets;
203
204 //------------------------------------------------------------------------------------------------
205 override void SetupWaypoint(IEntity waypointEntity)
206 {
207 super.SetupWaypoint(waypointEntity);
208
209 SCR_DefendWaypoint waypointDefend = SCR_DefendWaypoint.Cast(waypointEntity);
210 if (!waypointDefend)
211 return;
212
213 waypointDefend.SetFastInit(GetFastInit());
214
215 if (m_bClearDefaultDefendPresets)
216 waypointDefend.ClearDefendPresets();
217
218 foreach (SCR_DefendWaypointPreset defendPreset : m_aDefendPresets)
219 {
220 waypointDefend.AddDefendPreset(defendPreset);
221 }
222 }
223
224 //------------------------------------------------------------------------------------------------
226 void SetFastInit(bool enabled)
227 {
228 }
229
230 //------------------------------------------------------------------------------------------------
232 bool GetFastInit()
233 {
234 return false;
235 }
236}
237
238
240class SCR_ScenarioFrameworkWaypointBoarding : SCR_ScenarioFrameworkWaypointScripted
241{
242 //------------------------------------------------------------------------------------------------
243 override void SetupWaypoint(IEntity waypointEntity)
244 {
245 super.SetupWaypoint(waypointEntity);
246
247 SCR_BoardingWaypoint waypointBoarding = SCR_BoardingWaypoint.Cast(waypointEntity);
248 if (!waypointBoarding)
249 return;
250
251 waypointBoarding.SetAllowance(GetDriverAllowed(), GetGunnerAllowed(), GetCargoAllowed());
252 }
253
254 //------------------------------------------------------------------------------------------------
256 void SetDriverAllowed(bool enabled)
257 {
258 }
259
260 //------------------------------------------------------------------------------------------------
262 bool GetDriverAllowed()
263 {
264 return false;
265 }
266
267 //------------------------------------------------------------------------------------------------
269 void SetGunnerAllowed(bool enabled)
270 {
271 }
272
273 //------------------------------------------------------------------------------------------------
275 bool GetGunnerAllowed()
276 {
277 return false;
278 }
279
280 //------------------------------------------------------------------------------------------------
282 void SetCargoAllowed(bool enabled)
283 {
284 }
285
286 //------------------------------------------------------------------------------------------------
288 bool GetCargoAllowed()
289 {
290 return false;
291 }
292}
293
294
296class SCR_ScenarioFrameworkWaypointBoardingEntity : SCR_ScenarioFrameworkWaypointBoarding
297{
298 [Attribute(desc: "Related entity")]
299 string m_sEntityName;
300
301 //------------------------------------------------------------------------------------------------
302 override void SetupWaypoint(IEntity waypointEntity)
303 {
304 super.SetupWaypoint(waypointEntity);
305
306 SCR_BoardingEntityWaypoint waypointBoardingEntity = SCR_BoardingEntityWaypoint.Cast(waypointEntity);
307 if (!waypointBoardingEntity)
308 return;
309
310 waypointBoardingEntity.SetEntityName(m_sEntityName);
311 }
312}
313
314
316class SCR_ScenarioFrameworkWaypointBoardingTimed : SCR_ScenarioFrameworkWaypointBoarding
317{
318 //------------------------------------------------------------------------------------------------
319 override void SetupWaypoint(IEntity waypointEntity)
320 {
321 super.SetupWaypoint(waypointEntity);
322
323 SCR_BoardingTimedWaypoint waypointBoardingTimed = SCR_BoardingTimedWaypoint.Cast(waypointEntity);
324 if (!waypointBoardingTimed)
325 return;
326
327 waypointBoardingTimed.SetHoldingTime(GetWaypointHoldingTime());
328 }
329
330 //------------------------------------------------------------------------------------------------
332 void SetWaypointHoldingTime(float time);
333
334 //------------------------------------------------------------------------------------------------
336 float GetWaypointHoldingTime()
337 {
338 return 0;
339 }
340}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_EAISettingOrigin
EDamageType type
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
enum EVehicleType IEntity
void SetPriorityLevel(float priority)
void AddSetting(notnull SCR_AISettingBase s)
bool AddDefendPreset(SCR_DefendWaypointPreset preset)
void ClearDefendPresets()
Clears Defend Presets.
void SetFastInit(bool isFastInit)
SCR_FieldOfViewSettings Attribute