Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetHoldingTime.c
Go to the documentation of this file.
1 class SCR_AIGetHoldingTime : AITaskScripted
2 {
3 
4  protected static ref TStringArray s_aVarsOut = {
5  "HoldingTimeOut"
6  };
7  override TStringArray GetVariablesOut()
8  {
9  return s_aVarsOut;
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  SCR_TimedWaypoint wp = SCR_TimedWaypoint.Cast(group.GetCurrentWaypoint());
21  if ( wp )
22  {
23  SetVariableOut("HoldingTimeOut",wp.GetHoldingTime());
24  return ENodeResult.SUCCESS;
25  }
26 
27  return ENodeResult.FAIL;
28  }
29 
30  protected override bool VisibleInPalette()
31  {
32  return true;
33  }
34 
35  protected override string GetOnHoverDescription()
36  {
37  return "Gets holding time set on current timed waypoint";
38  }
39 
40 };
SCR_AgentMustBeAIGroup
void SCR_AgentMustBeAIGroup(Node node, AIAgent owner)
Definition: NodeError.c:14
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIGetHoldingTime
Definition: SCR_AIGetHoldingTime.c:1
SCR_TimedWaypoint
Definition: SCR_TimedWaypoint.c:5