Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_AIFireteamsClusterActivity.c
Go to the documentation of this file.
1 
7 {
8  protected SCR_AITargetClusterState m_ClusterState;
9 
10  //------------------------------------------------------------------------------------
11  void SCR_AIFireteamsClusterActivity(SCR_AIGroupUtilityComponent utility, AIWaypoint relatedWaypoint, notnull SCR_AITargetClusterState clusterState)
12  {
13  m_ClusterState = clusterState;
14 
15  utility.m_Perception.GetOnTargetClusterDeleted().Insert(Event_OnTargetClusterStateDeleted);
16  }
17 
18  //------------------------------------------------------------------------------------
20  {
21  if (m_Utility)
22  m_Utility.m_Perception.GetOnTargetClusterDeleted().Remove(Event_OnTargetClusterStateDeleted);
23  }
24 
25  //------------------------------------------------------------------------------------
26  void Event_OnTargetClusterStateDeleted(SCR_AITargetClusterState s)
27  {
28  if (s != m_ClusterState)
29  return;
30 
31  #ifdef AI_DEBUG
32  AddDebugMessage("Target cluster doesn't exist any more, activity is complete");
33  #endif
34 
35  // Group either forgot about it, or it was destroyed
36  Complete();
37  }
38 }
SCR_AIFireteamsActivity
Definition: SCR_AIFireteamsActivity.c:6
SCR_AIFireteamsClusterActivity
Definition: SCR_AIFireteamsClusterActivity.c:6
SCR_AITargetClusterState
void SCR_AITargetClusterState(SCR_AIGroupTargetCluster cluster)
Definition: SCR_AITargetClusterState.c:38