Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIGetStanceFromThreat.c
Go to the documentation of this file.
1 class SCR_AIGetStanceFromThreat : AITaskScripted
2 {
3  protected static const string STANCE_PORT = "Stance";
4 
5  protected SCR_AIUtilityComponent m_Utility;
6 
7  //------------------------------------------------------------------------------------
8  override void OnInit(AIAgent owner)
9  {
10  m_Utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
11  }
12 
13  //------------------------------------------------------------------------------------
14  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
15  {
16  if (!m_Utility)
17  return ENodeResult.FAIL;
18 
19  EAIThreatState threat = m_Utility.m_ThreatSystem.GetState();
20 
21  int stance = GetStanceFromThreat(threat);
22  SetVariableOut(STANCE_PORT, stance);
23 
24  return ENodeResult.SUCCESS;
25  }
26 
27  //------------------------------------------------------------------------------------
28  override bool VisibleInPalette() { return true; }
29 
30  //------------------------------------------------------------------------------------
31  protected static ref TStringArray s_aVarsOut = { STANCE_PORT };
32  override TStringArray GetVariablesOut()
33  {
34  return s_aVarsOut;
35  }
36 }
s_aVarsOut
SCR_AIPickupInventoryItemsBehavior s_aVarsOut
Definition: SCR_AIGetCombatMoveRequestParameters.c:149
SCR_AIGetStanceFromThreat
Definition: SCR_AIGetStanceFromThreat.c:1