Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoCombatEnemy.c
Go to the documentation of this file.
1 class SCR_AIDecoCombatEnemy : DecoratorScripted
2 {
3  SCR_AICombatComponent m_CombatComponent;
4 
5  //-------------------------------------------------------------------------------------------
7  protected BaseTarget GetEnemy(SCR_AICombatComponent combatComp);
8 
9  //-------------------------------------------------------------------------------------------
10  protected override bool TestFunction(AIAgent owner)
11  {
12  if (!m_CombatComponent)
13  return false;
14 
15  bool retVal = GetEnemy(m_CombatComponent) != null;
16  return retVal;
17  }
18 
19  //-------------------------------------------------------------------------------------------
20  protected override void OnInit(AIAgent owner)
21  {
22  m_CombatComponent = SCR_AICombatComponent.Cast(owner.GetControlledEntity().FindComponent(SCR_AICombatComponent));
23  }
24 
25  //-------------------------------------------------------------------------------------------
26  override bool VisibleInPalette() {return false; }
27 };
28 
30 {
31  //-------------------------------------------------------------------------------------------
32  override protected BaseTarget GetEnemy(SCR_AICombatComponent combatComp)
33  {
34  return combatComp.GetCurrentTarget();
35  }
36 
37  //-------------------------------------------------------------------------------------------
38  protected static override string GetOnHoverDescription()
39  {
40  return "Returns true when SCR_AICombatComponent.GetCurrentTarget() != null.";
41  }
42 
43  //-------------------------------------------------------------------------------------------
44  override bool VisibleInPalette() {return true; }
45 };
46 
48 {
49  //-------------------------------------------------------------------------------------------
50  override protected BaseTarget GetEnemy(SCR_AICombatComponent combatComp)
51  {
52  return combatComp.GetLastSeenEnemy();
53  }
54 
55  //-------------------------------------------------------------------------------------------
56  protected static override string GetOnHoverDescription()
57  {
58  return "Returns true when SCR_AICombatComponent.GetCurrentTarget() != null.";
59  }
60 
61  //-------------------------------------------------------------------------------------------
62  override bool VisibleInPalette() {return true; }
63 };
SCR_AIDecoCombatEnemy
Definition: SCR_AIDecoCombatEnemy.c:1
SCR_AIDecoLastSeenEnemy
Definition: SCR_AIDecoCombatEnemy.c:47
SCR_AIDecoCurrentEnemy
Definition: SCR_AIDecoCombatEnemy.c:29
BaseTarget
Definition: BaseTarget.c:12
m_CombatComponent
SCR_AICombatComponent m_CombatComponent
Definition: SCR_AIUtilityComponent.c:12