Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AICompleteWaypoint.c
Go to the documentation of this file.
1 class SCR_AICompleteWaypoint : AITaskScripted
2 {
3  protected static ref TStringArray s_aVarsIn = {
4  "WaypointIn"
5  };
6  override TStringArray GetVariablesIn()
7  {
8  return s_aVarsIn;
9  }
10 
11  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
12  {
13  AIGroup group = AIGroup.Cast(owner);
14  if (!group)
15  {
16  SCR_AgentMustBeAIGroup(this, owner);
17  return ENodeResult.FAIL;
18  }
19 
20  AIWaypoint wp;
21  GetVariableIn("WaypointIn",wp);
22  if ( !wp )
23  wp = group.GetCurrentWaypoint();
24  if ( wp )
25  {
26  group.CompleteWaypoint(wp);
27  return ENodeResult.SUCCESS;
28  }
29 
30  return ENodeResult.FAIL;
31  }
32 
33  protected override bool VisibleInPalette()
34  {
35  return true;
36  }
37 
38  protected override string GetOnHoverDescription()
39  {
40  return "Completes current waypoint";
41  }
42 
43 };
SCR_AgentMustBeAIGroup
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition: NodeError.c:14
SCR_AICompleteWaypoint
Definition: SCR_AICompleteWaypoint.c:1