Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TransportWaypoint.c
Go to the documentation of this file.
2 {
3 };
4 
6 {
7  [Attribute("", UIWidgets.EditBox, "How long AI should wait for vehicle to pick them up before moving out on foot")]
8  float m_WaitForBoardingTime;
9 
10  [Attribute("", UIWidgets.EditBox, "Name of character which AI will wait for as driver")]
11  string m_sDriverCharacterName;
12 
13  private IEntity m_pDriverEntity = null;
14 
15  float GetWaitForBoardingTime()
16  {
17  return m_WaitForBoardingTime;
18  }
19 
20  void SetWaitForBoardingTime(float newTime)
21  {
22  m_WaitForBoardingTime = newTime;
23  }
24 
25  void SetDriver(IEntity driver)
26  {
27  m_pDriverEntity = driver;
28  }
29 
30  IEntity GetDriver()
31  {
32  if (m_pDriverEntity)
33  {
34  return m_pDriverEntity;
35  };
36 
37  return GetGame().GetWorld().FindEntityByName(m_sDriverCharacterName);
38  }
39 
40  IEntity GetVehicle()
41  {
42  ChimeraCharacter char = ChimeraCharacter.Cast(GetDriver());
43  if (char)
44  {
45  CompartmentAccessComponent comp = char.GetCompartmentAccessComponent();
46  if (comp)
47  {
48  if (comp.IsInCompartment())
49  {
50  BaseCompartmentSlot slot = comp.GetCompartment();
51  if (slot)
52  {
53  auto testDriverSlot = PilotCompartmentSlot.Cast(slot);
54  if (testDriverSlot)
55  return slot.GetOwner();
56  }
57  }
58  }
59  }
60  return null;
61  }
62 
63 };
SCR_AIWaypointClass
Definition: SCR_AIWaypoint.c:1
SCR_TransportWaypointClass
Definition: SCR_TransportWaypoint.c:1
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_AIWaypoint
Definition: SCR_AIWaypoint.c:5
PilotCompartmentSlot
Definition: PilotCompartmentSlot.c:12
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_TransportWaypoint
Definition: SCR_TransportWaypoint.c:5