6 bool m_bOrdersSent =
false;
13 SetPriority(PRIORITY_ACTIVITY_ATTACK_CLUSTER);
14 SetIsUniqueInActionQueue(
false);
16 m_ClusterState = clusterState;
18 foreach (
auto ft : ftAttack)
21 m_aFireteamsAttack.Insert(ft);
24 foreach (
auto ft : ftCover)
27 m_aFireteamsCover.Insert(ft);
34 fireteamsAttack.Clear();
35 fireteamsCover.Clear();
37 foreach (
auto ft : m_aFireteamsAttack)
38 fireteamsAttack.Insert(ft);
40 foreach (
auto ft : m_aFireteamsCover)
41 fireteamsCover.Insert(ft);
50 if (m_aFireteamsAttack.IsEmpty())
53 AddDebugMessage(
"All attacking fireteams are destroyed, activity is failed");
63 UnregisterFireteam(ft);
67 override void OnActionSelected()
69 super.OnActionSelected();
77 if (!commsHandler.CanBypass())
81 IEntity talkRequestEntity = ftLock.GetFireteam().GetFirstMemberEntity();
83 int flankValue = Math.RandomIntInclusive(0, 1);
85 commsHandler.AddRequest(rq);
99 override void OnActionDeselected()
101 super.OnActionDeselected();
102 m_bOrdersSent =
false;
103 SendCancelMessages();
107 override void OnActionCompleted()
109 super.OnActionCompleted();
110 SendCancelMessages();
114 override void OnActionFailed()
116 super.OnActionFailed();
117 SendCancelMessages();
121 override void OnActionRemoved()
124 super.OnActionRemoved();
125 m_aFireteamsAttack.Clear();
126 m_aFireteamsCover.Clear();
131 void SendAttackMessages()
133 AICommunicationComponent comms = m_Utility.m_Owner.GetCommunicationComponent();
137 array<AIAgent> agents = {};
140 ft.GetFireteam().GetMembers(agents);
141 foreach (AIAgent agent : agents)
150 msg.m_RelatedGroupActivity =
this;
151 msg.SetReceiver(agent);
152 comms.RequestBroadcast(msg, agent);
158 ft.GetFireteam().GetMembers(agents);
159 foreach (AIAgent agent : agents)
168 msg.m_RelatedGroupActivity =
this;
169 msg.SetReceiver(agent);
170 comms.RequestBroadcast(msg, agent);
176 void SendCancelMessages()
178 AICommunicationComponent comms = m_Utility.m_Owner.GetCommunicationComponent();
182 array<AIAgent> agents = {};
185 ft.GetFireteam().GetMembers(agents);
186 foreach (AIAgent agent : agents)
192 msg.m_RelatedGroupActivity =
this;
193 msg.SetReceiver(agent);
194 comms.RequestBroadcast(msg, agent);
197 msgCancel.SetReceiver(agent);
198 comms.RequestBroadcast(msgCancel, agent);
204 override string GetDebugPanelText()
207 string str =
"FTs: (";
209 str = str +
string.Format(
"%1, ", m_Utility.m_FireteamMgr.GetFireteamId(ftLock.GetFireteam()));
212 str = str +
string.Format(
"%1, ", m_Utility.m_FireteamMgr.GetFireteamId(ftLock.GetFireteam()));
214 str = str +
string.Format(
") => C: %1", m_Utility.m_Perception.GetTargetClusterStateId(m_ClusterState));