Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDecoSuppressiveFire.c
Go to the documentation of this file.
1 // Script File//------------------------------------------------------------------------------------------------
2 class SCR_AIDecoSuppressiveFire : DecoratorScripted
3 {
4  static const string TARGET_PORT = "BaseTargetIn";
5 
6  //-----------------------------------------------------------------------------------------------------
7  protected override bool TestFunction(AIAgent owner)
8  {
9  BaseTarget target;
10  GetVariableIn(TARGET_PORT,target);
11 
12  if (!target)
13  {
14  return false;
15  }
16 
17  float traceFraction = target.GetTraceFraction();
18  return traceFraction > 0.5;
19  //return true;
20  }
21 
22  //-----------------------------------------------------------------------------------------------------
23  protected override bool VisibleInPalette()
24  {
25  return true;
26  }
27 
28  //-----------------------------------------------------------------------------------------------------
29  protected static ref TStringArray s_aVarsIn = {
30  TARGET_PORT
31  };
32  protected override TStringArray GetVariablesIn()
33  {
34  return s_aVarsIn;
35  }
36 };
BaseTarget
Definition: BaseTarget.c:12
SCR_AIDecoSuppressiveFire
Definition: SCR_AIDecoSuppressiveFire.c:2