3 protected static const string TARGET_INFO_PORT =
"TargetInfo";
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";
9 protected ref TStringArray s_aVarsIn = {TARGET_INFO_PORT};
10 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
12 protected ref TStringArray s_aVarsOut = {
14 LAST_SEEN_POSITION_PORT,
17 override TStringArray GetVariablesOut() {
return s_aVarsOut; }
19 override bool VisibleInPalette() {
return true; }
21 override string GetOnHoverDescription() {
return "Returns properties of provided BaseTarget or TargetInfo"; };
23 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
26 SCR_AITargetInfo targetInfo;
28 if(!GetVariableIn(TARGET_INFO_PORT, targetInfo))
29 return ENodeResult.FAIL;
33 SetVariableOut(ENTITY_PORT, targetInfo.m_Entity);
34 SetVariableOut(LAST_SEEN_POSITION_PORT, targetInfo.m_vWorldPos);
35 SetVariableOut(TIME_SINCE_SEEN_PORT, targetInfo.m_fTimestamp);
36 return ENodeResult.SUCCESS;
38 return ENodeResult.FAIL;