Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGetBaseTargetProperties.c
Go to the documentation of this file.
2{
3 protected static const string BASE_TARGET_PORT = "BaseTarget";
4
5 protected static const string ENTITY_PORT = "Entity";
6 protected static const string LAST_SEEN_POSITION_PORT = "LastSeenPosition";
7 protected static const string TIME_SINCE_SEEN_PORT = "TimeSinceSeen";
8 protected static const string ENDANGERING_PORT = "IsEndangering";
9
11 override TStringArray GetVariablesIn() { return s_aVarsIn; }
12
20
21 static override bool VisibleInPalette() { return true; }
22
23 static override string GetOnHoverDescription() { return "Returns properties of provided BaseTarget"; };
24
25 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
26 {
27 BaseTarget baseTarget;
28
29 if (!GetVariableIn(BASE_TARGET_PORT, baseTarget))
30 return ENodeResult.FAIL;
31
32 if (!baseTarget)
33 return ENodeResult.FAIL;
34
35 SetVariableOut(ENTITY_PORT, baseTarget.GetTargetEntity());
36 SetVariableOut(LAST_SEEN_POSITION_PORT, baseTarget.GetLastSeenPosition());
37 SetVariableOut(TIME_SINCE_SEEN_PORT, baseTarget.GetTimeSinceSeen());
38 SetVariableOut(ENDANGERING_PORT, baseTarget.IsEndangering());
39 return ENodeResult.SUCCESS;
40 }
41}
proto void SetVariableOut(string name, void val)
proto bool GetVariableIn(string name, out void val)
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
ENodeResult
Definition ENodeResult.c:13
array< string > TStringArray
Definition Types.c:385