Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetDefendWaypoint.c
Go to the documentation of this file.
2 {
3  static const string USE_TURRETS_PORT = "UseTurrets";
4  static const string SEARCH_TAGS_PORT = "SearchTags";
5  static const string FAST_INIT_PORT = "FastInit";
6 
7  ref array<string> m_tagsArray;
8 
9  //------------------------------------------------------------------------------------------------
10  protected static ref TStringArray s_aVarsOut2 = {
11  RADIUS_PORT,
12  USE_TURRETS_PORT,
13  SEARCH_TAGS_PORT,
14  FAST_INIT_PORT
15  };
16 
17  //------------------------------------------------------------------------------------------------
18  override TStringArray GetVariablesOut()
19  {
20  return s_aVarsOut2;
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
25  {
26  if (ENodeResult.FAIL == super.EOnTaskSimulate(owner, dt))
27  return ENodeResult.FAIL;
28 
30  if (!wp)
31  {
32  return NodeError(this, owner, "Wrong class of provided Waypoint!");
33  }
34 
35  m_tagsArray = wp.GetTagsForSearch();
36 
37  SetVariableOut(USE_TURRETS_PORT, wp.GetUseTurrets());
38  SetVariableOut(SEARCH_TAGS_PORT, m_tagsArray);
39  SetVariableOut(FAST_INIT_PORT, wp.GetFastInit());
40 
41  return ENodeResult.SUCCESS;
42  }
43 
44  //------------------------------------------------------------------------------------------------
45  protected override bool VisibleInPalette()
46  {
47  return true;
48  }
49 
50  //------------------------------------------------------------------------------------------------
51  protected override string GetOnHoverDescription()
52  {
53  return "Returns defend waypoint parameters";
54  }
55 };
SCR_AIGetDefendWaypoint
Definition: SCR_AIGetDefendWaypoint.c:1
SCR_DefendWaypoint
Definition: SCR_DefendWaypoint.c:18
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition: NodeError.c:3
m_Waypoint
protected AIWaypoint m_Waypoint
Definition: SCR_AmbientPatrolSpawnPointComponent.c:48
SCR_AIGetWaypoint
Definition: SCR_AIGetWaypoint.c:1