Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetTargetInfoProperties.c
Go to the documentation of this file.
1 class SCR_AIGetTargetInfoProperties : AITaskScripted
2 {
3  protected static const string TARGET_INFO_PORT = "TargetInfo";
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 
9  protected ref TStringArray s_aVarsIn = {TARGET_INFO_PORT};
10  override TStringArray GetVariablesIn() { return s_aVarsIn; }
11 
12  protected ref TStringArray s_aVarsOut = {
13  ENTITY_PORT,
14  LAST_SEEN_POSITION_PORT,
15  TIME_SINCE_SEEN_PORT,
16  };
17  override TStringArray GetVariablesOut() { return s_aVarsOut; }
18 
19  override bool VisibleInPalette() { return true; }
20 
21  override string GetOnHoverDescription() { return "Returns properties of provided BaseTarget or TargetInfo"; };
22 
23  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
24  {
25  BaseTarget baseTarget;
26  SCR_AITargetInfo targetInfo;
27 
28  if(!GetVariableIn(TARGET_INFO_PORT, targetInfo))
29  return ENodeResult.FAIL;
30 
31  if (targetInfo)
32  {
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;
37  }
38  return ENodeResult.FAIL;
39  }
40 }
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
BaseTarget
Definition: BaseTarget.c:12
SCR_AIGetTargetInfoProperties
Definition: SCR_AIGetTargetInfoProperties.c:1