Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetPriorityFromWaypoint.c
Go to the documentation of this file.
1 class SCR_AIGetPriorityFromWaypoint : AITaskScripted
2 {
3  static const string PORT_PRIORITY_LEVEL = "PriorityLevel";
4 
5  //------------------------------------------------------------------------------------------------
6  protected static ref TStringArray s_aVarsOut = {
7  PORT_PRIORITY_LEVEL
8  };
9  override TStringArray GetVariablesOut()
10  {
11  return s_aVarsOut;
12  }
13 
14  //------------------------------------------------------------------------------------------------
15  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
16  {
17  AIGroup group = AIGroup.Cast(owner);
18  if (!group)
19  {
20  SCR_AgentMustBeAIGroup(this, owner);
21  return ENodeResult.FAIL;
22  }
23 
24  SCR_AIWaypoint wp = SCR_AIWaypoint.Cast(group.GetCurrentWaypoint());
25  if (!wp)
26  {
27  return ENodeResult.FAIL;
28  }
29 
30  SetVariableOut(PORT_PRIORITY_LEVEL, wp.GetPriorityLevel());
31  return ENodeResult.SUCCESS;
32  }
33 
34  //------------------------------------------------------------------------------------------------
35  protected override bool VisibleInPalette()
36  {
37  return true;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  protected override string GetOnHoverDescription()
42  {
43  return "Returns if waypoint is priority, i.e. autonomous behavior of AI will be ignored.";
44  }
45 };
SCR_AgentMustBeAIGroup
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition: NodeError.c:14
SCR_AIWaypoint
Definition: SCR_AIWaypoint.c:5
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIGetPriorityFromWaypoint
Definition: SCR_AIGetPriorityFromWaypoint.c:1