Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AICompleteWaypoint.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 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 static override bool VisibleInPalette()
34 {
35 return true;
36 }
37
38 protected static override string GetOnHoverDescription()
39 {
40 return "Completes current waypoint";
41 }
42
43};
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition NodeError.c:14
proto bool GetVariableIn(string name, out void val)
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
override TStringArray GetVariablesIn()
static ref TStringArray s_aVarsIn
static override string GetOnHoverDescription()
static override bool VisibleInPalette()
ENodeResult
Definition ENodeResult.c:13
array< string > TStringArray
Definition Types.c:385