Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIActivateAllBirds.c
Go to the documentation of this file.
1 class SCR_AIActivateAllBirds: AITaskScripted
2 {
3 
4  [Attribute("false", UIWidgets.CheckBox, "If true the birds will be activated, if false they will be deactivated")]
5  private bool m_activateBirds;
6 
7  //------------------------------------------------------------------------------------------------
8  override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
9  {
10 
11  AIFlock flock = AIFlock.Cast(owner);
12  if(!flock)
13  {
14  NodeError(this,owner,"Owner is not a flock. Can't activate.");
15  return ENodeResult.FAIL;
16  }
17 
18  flock.ActivateAllBirds(m_activateBirds);
19  return ENodeResult.SUCCESS;
20  }
21 
22  //------------------------------------------------------------------------------------------------
23  override bool VisibleInPalette()
24  {
25  return true;
26  }
27 
28  //------------------------------------------------------------------------------------------------
29  protected override string GetOnHoverDescription()
30  {
31  return "Active All Birds: Broadcast to all clients if they should activete/deactivete their individual birds";
32  }
33 
34  //------------------------------------------------------------------------------------------------
35 
36  override protected bool CanReturnRunning()
37  {
38  return false;
39  }
40 };
SCR_AIActivateAllBirds
Definition: SCR_AIActivateAllBirds.c:1
NodeError
ENodeResult NodeError(Node node, AIAgent owner, string msg)
Error call to be used in scripted BT nodes.
Definition: NodeError.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.