Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetInActivity.c
Go to the documentation of this file.
2 {
3  ref SCR_BTParam<IEntity> m_Vehicle = new SCR_BTParam<IEntity>(SCR_AIActionTask.ENTITY_PORT);
4  ref SCR_BTParam<ECompartmentType> m_eRoleInVehicle = new SCR_BTParam<ECompartmentType>(SCR_AIActionTask.ROLEINVEHICLE_PORT);
5  protected SCR_AIGroup m_OwnerGroup;
6 
7  void InitParameters(IEntity vehicle, ECompartmentType role, float priorityLevel)
8  {
9  m_Vehicle.Init(this, vehicle);
10  m_eRoleInVehicle.Init(this, role);
11  m_fPriorityLevel.Init(this, priorityLevel);
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  void SCR_AIGetInActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, IEntity vehicle, ECompartmentType role = ECompartmentType.Cargo, float priority = PRIORITY_ACTIVITY_GET_IN, float priorityLevel = PRIORITY_LEVEL_NORMAL)
16  {
17  InitParameters(vehicle, role, priorityLevel);
18  m_sBehaviorTree = "AI/BehaviorTrees/Chimera/Group/ActivityGetIn.bt";
19  SetPriority(priority);
20  if (utility)
21  m_OwnerGroup = SCR_AIGroup.Cast(utility.GetAIAgent());
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  override string GetActionDebugInfo()
26  {
27  return this.ToString() + " moving to " + m_Vehicle.ValueToString() + " as " + m_eRoleInVehicle.ValueToString();
28  }
29 
30  //------------------------------------------------------------------------------------------------
31  override void OnActionDeselected()
32  {
33  super.OnActionDeselected();
34  m_OwnerGroup.ReleaseCompartments();
35  }
36 
37  //------------------------------------------------------------------------------------------------
38  override void OnActionCompleted()
39  {
40  super.OnActionCompleted();
41  m_OwnerGroup.ReleaseCompartments();
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  override void OnActionFailed()
46  {
47  super.OnActionFailed();
48  m_OwnerGroup.ReleaseCompartments();
49  m_OwnerGroup.RemoveUsableVehicle(m_Vehicle.m_Value);
50  }
51 };
m_eRoleInVehicle
EAICompartmentType m_eRoleInVehicle
Definition: SendGoalMessage.c:989
m_fPriorityLevel
float m_fPriorityLevel
Definition: SendGoalMessage.c:3
ECompartmentType
ECompartmentType
Definition: ECompartmentType.c:7
SCR_AIActivityBase
Definition: SCR_AIActivity.c:1
m_Vehicle
enum EAICompartmentType m_Vehicle
SCR_AIGetInActivity
Definition: SCR_AIGetInActivity.c:1
SCR_AIGroup
Definition: SCR_AIGroup.c:68
SCR_AIActionTask
Definition: SCR_AIBehaviorTask.c:1