Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoIsWithinRadius.c
Go to the documentation of this file.
1 class SCR_AIDecoIsWithinRadius : DecoratorScripted
2 {
3  protected static ref TStringArray s_aVarsIn = {
4  "WaypointIn"
5  };
6  override TStringArray GetVariablesIn()
7  {
8  return s_aVarsIn;
9  }
10 
11  protected override bool TestFunction(AIAgent owner)
12  {
13  AIWaypoint waypoint;
14  AIGroup group = AIGroup.Cast(owner);
15  if (!group)
16  {
17  SCR_AgentMustBeAIGroup(this, owner);
18  return false;
19  }
20 
21  if (!GetVariableIn("WaypointIn",waypoint))
22  waypoint = group.GetCurrentWaypoint();
23  if (waypoint)
24  return waypoint.IsWithinCompletionRadius(group);
25  return false;
26  }
27 
28  protected override bool VisibleInPalette()
29  {
30  return true;
31  }
32 
33  protected override string GetOnHoverDescription()
34  {
35  return "Decorator that test that all AIAgents are within completion radius of waypoint, current waypoint is used if none is provided";
36  }
37 };
SCR_AgentMustBeAIGroup
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition: NodeError.c:14
SCR_AIDecoIsWithinRadius
Definition: SCR_AIDecoIsWithinRadius.c:1