Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetInNearestWaypoint.c
Go to the documentation of this file.
2 {
3  static const string PORT_WAYPOINT_PARAMS = "WaypointParams";
4  static const string PORT_ORIGIN = "Origin";
5 
6  //------------------------------------------------------------------------------------------------
7  protected static ref TStringArray s_aVarsOut2 = {
8  RADIUS_PORT,
9  PORT_ORIGIN,
10  PORT_WAYPOINT_PARAMS
11  };
12  override TStringArray GetVariablesOut()
13  {
14  return s_aVarsOut2;
15  }
16 
17  //------------------------------------------------------------------------------------------------
18  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
19  {
20  if (ENodeResult.FAIL == super.EOnTaskSimulate(owner, dt))
21  return ENodeResult.FAIL;
22 
24  if (!wp)
25  {
26  return NodeError(this, owner, "Wrong class of provided Waypoint!");
27  }
28 
29  SetVariableOut(PORT_WAYPOINT_PARAMS,wp.GetAllowance());
30  SetVariableOut(PORT_ORIGIN,wp.GetOrigin());
31 
32  return ENodeResult.SUCCESS;
33  }
34 
35  //------------------------------------------------------------------------------------------------
36  protected override bool VisibleInPalette()
37  {
38  return true;
39  }
40 
41  //------------------------------------------------------------------------------------------------
42  protected override string GetOnHoverDescription()
43  {
44  return "Returns get in nearest waypoint parameters";
45  }
46 
47 };
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition: NodeError.c:3
SCR_BoardingWaypoint
Definition: SCR_BoardingWaypoint.c:12
SCR_AIGetInNearestWaypoint
Definition: SCR_AIGetInNearestWaypoint.c:1
m_Waypoint
protected AIWaypoint m_Waypoint
Definition: SCR_AmbientPatrolSpawnPointComponent.c:48
SCR_AIGetWaypoint
Definition: SCR_AIGetWaypoint.c:1