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 ref SCR_AITargetInfo m_TargetInfo;
11 protected ref TStringArray s_aVarsIn = {
13 LAST_SEEN_POSITION_PORT,
16 protected ref TStringArray s_aVarsOut = {TARGET_INFO_PORT};
17 override TStringArray GetVariablesIn() {
return s_aVarsIn; }
19 override TStringArray GetVariablesOut() {
return s_aVarsOut; }
21 override bool VisibleInPalette() {
return true; }
23 override string GetOnHoverDescription() {
return "Create SCR_TargetInfo object from its member variables"; };
26 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
28 m_TargetInfo =
new SCR_AITargetInfo();
30 if(!GetVariableIn(ENTITY_PORT, m_TargetInfo.m_Entity))
31 return NodeError(
this, owner,
"No entity provided!");
33 GetVariableIn(LAST_SEEN_POSITION_PORT, m_TargetInfo.m_vWorldPos);
34 GetVariableIn(TIME_SINCE_SEEN_PORT, m_TargetInfo.m_fTimestamp);
35 SetVariableOut(TARGET_INFO_PORT, m_TargetInfo);
36 return ENodeResult.SUCCESS;