Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGetEntityPosition.c
Go to the documentation of this file.
1
3{
4 [Attribute("0 0 0", UIWidgets.Auto)]
6
7 [Attribute("0 0 0", UIWidgets.Auto)]
9
10 protected static const string ENTITY_PORT = "Entity";
11 protected static const string POSITION_PORT = "Position";
12
13 static override bool VisibleInPalette() { return true; }
14
15 static override string GetOnHoverDescription()
16 {
17 return "Returns position of entity with local and world space offset.";
18 }
19
20 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
21 {
22 IEntity myEntity = owner.GetControlledEntity();
23
24 IEntity entity;
26 if (!entity && !myEntity)
27 return ENodeResult.FAIL;
28
29 if (!entity)
30 entity = myEntity;
31
32 vector posOut = entity.CoordToParent(m_fOffsetLocal);
33 posOut = posOut + m_fOffsetWorld;
35
36 return ENodeResult.SUCCESS;
37 }
38
39 protected static ref TStringArray s_aVarsIn = { ENTITY_PORT };
40 override TStringArray GetVariablesIn() { return s_aVarsIn; }
41
42 protected static ref TStringArray s_aVarsOut = { POSITION_PORT };
44}
proto external vector CoordToParent(vector coord)
proto void SetVariableOut(string name, void val)
proto bool GetVariableIn(string name, out void val)
Returns a position of entity with local space offset.
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
static override bool VisibleInPalette()
static override string GetOnHoverDescription()
static const string POSITION_PORT
override TStringArray GetVariablesIn()
static ref TStringArray s_aVarsIn
static ref TStringArray s_aVarsOut
override TStringArray GetVariablesOut()
ENodeResult
Definition ENodeResult.c:13
SCR_FieldOfViewSettings Attribute
array< string > TStringArray
Definition Types.c:385