Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetPositionAndDirection.c
Go to the documentation of this file.
1 class SCR_AIGetPositionAndRotation: AITaskScripted
2 {
3  override bool VisibleInPalette() {return true;}
4 
5  protected static ref TStringArray s_aVarsIn = {
6  "Entity"
7  };
8  override array<string> GetVariablesIn()
9  {
10  return s_aVarsIn;
11  }
12 
13  protected static ref TStringArray s_aVarsOut = {
14  "Position",
15  "Rotation"
16  };
17  override array<string> GetVariablesOut()
18  {
19  return s_aVarsOut;
20  }
21 
22  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
23  {
24  IEntity entity;
25  GetVariableIn("Entity",entity);
26  if (!entity)
27  entity = owner.GetControlledEntity();
28 
29  if (!entity)
30  return ENodeResult.FAIL;
31 
32  SetVariableOut("Position",entity.GetOrigin());
33  SetVariableOut("Rotation",entity.GetAngles());
34 
35  return ENodeResult.SUCCESS;
36  }
37 };
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIGetPositionAndRotation
Definition: SCR_AIGetPositionAndDirection.c:1