Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIBaseTargetToTargetInfo.c
Go to the documentation of this file.
1 class SCR_AIBaseTargetToTargetInfo : AITaskScripted
2 {
3  protected static const string TARGET_INFO_PORT = "TargetInfoOut";
4 
5  protected static const string BASE_TARGET = "BaseTargetIn";
6 
7  protected ref TStringArray s_aVarsOut = {TARGET_INFO_PORT};
8  protected ref TStringArray s_aVarsIn = {BASE_TARGET};
9  override TStringArray GetVariablesIn() { return s_aVarsIn; }
10  override TStringArray GetVariablesOut() { return s_aVarsOut; }
11  ref SCR_AITargetInfo m_TargetInfo;
12 
13  override bool VisibleInPalette() { return true; }
14 
15  override string GetOnHoverDescription() { return "Converts baseTarget object instance to SCR_AITarget info object instance"; };
16 
17  //---------------------------------------------------------------------------------------
18  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
19  {
20  BaseTarget baseTarget;
21 
22  if (!GetVariableIn(BASE_TARGET, baseTarget))
23  return NodeError(this, owner, "No base target provided!");
24  m_TargetInfo = new SCR_AITargetInfo();
25  m_TargetInfo.InitFromBaseTarget(baseTarget);
26  SetVariableOut(TARGET_INFO_PORT, m_TargetInfo);
27  return ENodeResult.SUCCESS;
28  }
29 }
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
BaseTarget
Definition: BaseTarget.c:12
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition: NodeError.c:3
SCR_AIBaseTargetToTargetInfo
Definition: SCR_AIBaseTargetToTargetInfo.c:1