Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIDecoIsWithinRadius.c
Go to the documentation of this file.
2{
3 protected static ref TStringArray s_aVarsIn = {
4 "WaypointIn"
5 };
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 static override bool VisibleInPalette()
29 {
30 return true;
31 }
32
33 protected static 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};
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition NodeError.c:14
proto bool GetVariableIn(string name, out void val)
static override bool VisibleInPalette()
override TStringArray GetVariablesIn()
override bool TestFunction(AIAgent owner)
static override string GetOnHoverDescription()
static ref TStringArray s_aVarsIn
array< string > TStringArray
Definition Types.c:385