Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGetPositionAndDirection.c
Go to the documentation of this file.
2{
3 static 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};
proto external vector GetAngles()
Same as GetYawPitchRoll(), but returns rotation vector around X, Y and Z axis.
proto external vector GetOrigin()
proto void SetVariableOut(string name, void val)
proto bool GetVariableIn(string name, out void val)
bool VisibleInPalette()
override array< string > GetVariablesIn()
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
override array< string > GetVariablesOut()
ENodeResult
Definition ENodeResult.c:13
array< string > TStringArray
Definition Types.c:385