Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIRemoveStuckVehicle.c
Go to the documentation of this file.
1 class SCR_AIRemoveStuckVehicle : AITaskScripted
2 {
3 
4  SCR_AIGroup m_rGroup;
5  IEntity m_vehicleEnt;
6 
7  override void OnInit(AIAgent owner)
8  {
9  m_rGroup = SCR_AIGroup.Cast(owner);
10  }
11 
12  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
13  {
14  if (GetVariableIn("VehicleIn",m_vehicleEnt))
15  {
16  Vehicle vehicle = Vehicle.Cast(m_vehicleEnt);
17  if (m_rGroup && vehicle)
18  {
19 
20  m_rGroup.RemoveUsableVehicle(vehicle);
21  return ENodeResult.SUCCESS;
22  };
23  }
24  return ENodeResult.FAIL;
25  }
26 
27  protected static ref TStringArray s_aVarsIn = {
28  "VehicleIn"
29  };
30  override TStringArray GetVariablesIn()
31  {
32  return s_aVarsIn;
33  }
34 
35  override bool VisibleInPalette()
36  {
37  return true;
38  }
39 
40  override string GetOnHoverDescription()
41  {
42  return "Remove stuck vehicle: when vehicle cannot be moved it removes it from group's list of owned vehicles";
43  }
44 };
SCR_AIGroup
Definition: SCR_AIGroup.c:68
SCR_AIRemoveStuckVehicle
Definition: SCR_AIRemoveStuckVehicle.c:1