3 protected static const string BASE_TARGET_PORT =
"BaseTarget";
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";
10 protected ref TStringArray s_aVarsIn = {BASE_TARGET_PORT};
11 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
13 protected ref TStringArray s_aVarsOut = {
15 LAST_SEEN_POSITION_PORT,
19 override TStringArray GetVariablesOut() {
return s_aVarsOut; }
21 override bool VisibleInPalette() {
return true; }
23 override string GetOnHoverDescription() {
return "Returns properties of provided BaseTarget"; };
25 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
29 if (!GetVariableIn(BASE_TARGET_PORT, baseTarget))
30 return ENodeResult.FAIL;
33 return ENodeResult.FAIL;
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;