Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ScenarioFrameworkWaypoint.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
4 {
5  //TODO: Request Autocomplete attribute to be exposed to script with getters and setters
6  //TODO: Request AI Behaviour Tree attribute to be exposed to script with getters and setters
7  //TODO: Request AI Behaviour Tree Move To attribute to be exposed to script with getters and setters
8 
11 
12  SCR_ScenarioFrameworkLayerBase m_SlotWaypoint;
13 
14  //------------------------------------------------------------------------------------------------
16  void SetupWaypoint(IEntity waypointEntity)
17  {
18  AIWaypoint waypoint = AIWaypoint.Cast(waypointEntity);
19  if (!waypoint)
20  return;
21 
22  waypoint.SetCompletionRadius(GetWaypointCompletionRadius());
23  waypoint.SetCompletionType(GetWaypointCompletionType());
24  }
25 
26  //------------------------------------------------------------------------------------------------
28  void SetWaypointCompletionRadius(float radius)
29  {
30  }
31 
32  //------------------------------------------------------------------------------------------------
34  float GetWaypointCompletionRadius()
35  {
36  return 10;
37  }
38 
39  //------------------------------------------------------------------------------------------------
41  void SetWaypointCompletionType(EAIWaypointCompletionType type)
42  {
43  }
44 
45  //------------------------------------------------------------------------------------------------
47  EAIWaypointCompletionType GetWaypointCompletionType()
48  {
49  return EAIWaypointCompletionType.Any;
50  }
51 
52  //------------------------------------------------------------------------------------------------
54  void SetWaypointPrefab(ResourceName prefab)
55  {
56  }
57 
58  //------------------------------------------------------------------------------------------------
60  ResourceName GetWaypointPrefab()
61  {
62  return string.Empty;
63  }
64 }
65 
66 //------------------------------------------------------------------------------------------------
68 class SCR_ScenarioFrameworkWaypointScripted : SCR_ScenarioFrameworkWaypoint
69 {
70  //------------------------------------------------------------------------------------------------
71  override void SetupWaypoint(IEntity waypointEntity)
72  {
73  super.SetupWaypoint(waypointEntity);
74 
75  SCR_AIWaypoint waypointScripted = SCR_AIWaypoint.Cast(waypointEntity);
76  if (!waypointScripted)
77  return;
78 
79  waypointScripted.SetPriorityLevel(GetWaypointPriorityLevel());
80  }
81 
82  //------------------------------------------------------------------------------------------------
84  void SetWaypointPriorityLevel(float priority)
85  {
86  }
87 
88  //------------------------------------------------------------------------------------------------
90  float GetWaypointPriorityLevel()
91  {
92  return 0;
93  }
94 }
95 
96 //------------------------------------------------------------------------------------------------
98 class SCR_ScenarioFrameworkWaypointSmartAction : SCR_ScenarioFrameworkWaypointScripted
99 {
100  [Attribute("", UIWidgets.EditBox, "Static reference to entity with smart action")]
101  string m_sStaticEntityName;
102 
103  //------------------------------------------------------------------------------------------------
104  override void SetupWaypoint(IEntity waypointEntity)
105  {
106  super.SetupWaypoint(waypointEntity);
107 
108  SCR_SmartActionWaypoint waypointSmartAction = SCR_SmartActionWaypoint.Cast(waypointEntity);
109  if (!waypointSmartAction)
110  return;
111 
112  waypointSmartAction.m_sSmartActionTag = GetWaypointSmartActionTag();
113  waypointSmartAction.m_sStaticEntityName = m_sStaticEntityName;
114  }
115 
116  //------------------------------------------------------------------------------------------------
118  void SetWaypointSmartActionTag(string tag)
119  {
120  }
121 
122  //------------------------------------------------------------------------------------------------
124  string GetWaypointSmartActionTag()
125  {
126  return string.Empty;
127  }
128 }
129 
130 //------------------------------------------------------------------------------------------------
132 class SCR_ScenarioFrameworkWaypointEntity : SCR_ScenarioFrameworkWaypointScripted
133 {
134  [Attribute("", UIWidgets.EditBox, "Related entity")]
135  string m_sEntityName;
136 
137  //------------------------------------------------------------------------------------------------
138  override void SetupWaypoint(IEntity waypointEntity)
139  {
140  super.SetupWaypoint(waypointEntity);
141 
142  SCR_EntityWaypoint waypointScriptedEntity = SCR_EntityWaypoint.Cast(waypointEntity);
143  if (!waypointScriptedEntity)
144  return;
145 
146  waypointScriptedEntity.SetEntityName(m_sEntityName);
147  }
148 }
149 
150 //------------------------------------------------------------------------------------------------
152 class SCR_ScenarioFrameworkWaypointTimed : SCR_ScenarioFrameworkWaypointScripted
153 {
154  //------------------------------------------------------------------------------------------------
155  override void SetupWaypoint(IEntity waypointEntity)
156  {
157  super.SetupWaypoint(waypointEntity);
158 
159  SCR_TimedWaypoint waypointTimed = SCR_TimedWaypoint.Cast(waypointEntity);
160  if (!waypointTimed)
161  return;
162 
163  waypointTimed.SetHoldingTime(GetWaypointHoldingTime());
164  }
165 
166  //------------------------------------------------------------------------------------------------
168  void SetWaypointHoldingTime(float time)
169  {
170  }
171 
172  //------------------------------------------------------------------------------------------------
174  float GetWaypointHoldingTime()
175  {
176  return 0;
177  }
178 }
179 
180 //------------------------------------------------------------------------------------------------
182 class SCR_ScenarioFrameworkWaypointTimedDefend : SCR_ScenarioFrameworkWaypointTimed
183 {
184  //------------------------------------------------------------------------------------------------
185  override void SetupWaypoint(IEntity waypointEntity)
186  {
187  super.SetupWaypoint(waypointEntity);
188 
189  SCR_DefendWaypoint waypointDefend = SCR_DefendWaypoint.Cast(waypointEntity);
190  if (!waypointDefend)
191  return;
192 
193  waypointDefend.SetFastInit(GetFastInit());
194  }
195 
196  //------------------------------------------------------------------------------------------------
198  void SetFastInit(bool enabled)
199  {
200  }
201 
202  //------------------------------------------------------------------------------------------------
204  bool GetFastInit()
205  {
206  return false;
207  }
208 }
209 
210 //------------------------------------------------------------------------------------------------
212 class SCR_ScenarioFrameworkWaypointBoarding : SCR_ScenarioFrameworkWaypointTimed
213 {
214  //------------------------------------------------------------------------------------------------
215  override void SetupWaypoint(IEntity waypointEntity)
216  {
217  super.SetupWaypoint(waypointEntity);
218 
219  SCR_BoardingWaypoint waypointBoarding = SCR_BoardingWaypoint.Cast(waypointEntity);
220  if (!waypointBoarding)
221  return;
222 
223  waypointBoarding.SetAllowance(GetDriverAllowed(), GetGunnerAllowed(), GetCargoAllowed());
224  }
225 
226  //------------------------------------------------------------------------------------------------
228  void SetDriverAllowed(bool enabled)
229  {
230  }
231 
232  //------------------------------------------------------------------------------------------------
234  bool GetDriverAllowed()
235  {
236  return false;
237  }
238 
239  //------------------------------------------------------------------------------------------------
241  void SetGunnerAllowed(bool enabled)
242  {
243  }
244 
245  //------------------------------------------------------------------------------------------------
247  bool GetGunnerAllowed()
248  {
249  return false;
250  }
251 
252  //------------------------------------------------------------------------------------------------
254  void SetCargoAllowed(bool enabled)
255  {
256  }
257 
258  //------------------------------------------------------------------------------------------------
260  bool GetCargoAllowed()
261  {
262  return false;
263  }
264 }
SCR_AIWaypoint
Definition: SCR_AIWaypoint.c:5
SCR_DefendWaypoint
Definition: SCR_DefendWaypoint.c:18
SCR_TimedWaypoint
Definition: SCR_TimedWaypoint.c:5
SCR_BoardingWaypoint
Definition: SCR_BoardingWaypoint.c:12
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_SmartActionWaypoint
Definition: SCR_SmartActionWaypoint.c:4
SCR_ScenarioFrameworkWaypoint
Definition: SCR_ScenarioFrameworkWaypoint.c:3
SCR_ScenarioFrameworkLayerBase
void SCR_ScenarioFrameworkLayerBase(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_ScenarioFrameworkLayerBase.c:875
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
SCR_EntityWaypoint
Definition: SCR_EntityWaypoint.c:5
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468