Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIDrawDebugVector.c
Go to the documentation of this file.
1 class SCR_AIDrawDebugVector: AITaskScripted
2 {
3  static const string PORT_POS_START = "StartPosIn";
4  static const string PORT_POS_END = "EndPosIn";
5 
6  ref Shape sphere;
7  ref Shape arrow;
8 
9  //------------------------------------------------------------------------------------------------
10  protected static ref TStringArray s_aVarsIn = {
11  PORT_POS_START,
12  PORT_POS_END
13  };
14  override TStringArray GetVariablesIn()
15  {
16  return s_aVarsIn;
17  }
18 
19  //------------------------------------------------------------------------------------------------
20  override bool VisibleInPalette()
21  {
22  return true;
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
27  {
28 #ifdef WORKBENCH
29  if (DiagMenu.GetBool(SCR_DebugMenuID.DEBUGUI_AI_SHOW_DEBUG_SHAPES))
30  {
31  vector posFrom,posTo;
32 
33  GetVariableIn(PORT_POS_START, posFrom);
34  GetVariableIn(PORT_POS_END, posTo);
35 
36  arrow = Shape.CreateArrow(posFrom, posTo, 0.2, ARGB(100,255,0,0), 0);
37  sphere = Shape.CreateSphere(ARGB(100,255,0,0),ShapeFlags.TRANSP | ShapeFlags.NOOUTLINE, posFrom, 0.05);
38  }
39 #endif
40  return ENodeResult.SUCCESS;
41  }
42 
43  //------------------------------------------------------------------------------------------------
44  protected override string GetOnHoverDescription()
45  {
46  return "Draws a vector from Start to End";
47  }
48 };
SCR_AIDrawDebugVector
Definition: SCR_AIDrawDebugVector.c:1
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition: DebugMenuID.c:3