8 [
Attribute(
"", UIWidgets.EditBox,
"Preset name, only informative. Switch using index.")];
9 private string m_sName;
11 [
Attribute(
"true", UIWidgets.CheckBox,
"Use turrets?")];
14 [
Attribute(
"", UIWidgets.Auto,
"List tags to search in the preset")];
15 ref array<string> m_aTagsForSearch;
20 [
Attribute(
"0", UIWidgets.Object,
"Fast init - units will be spawned on their defensive locations")];
21 private bool m_bFastInit;
23 [
Attribute(
"", UIWidgets.Object,
"Defend presets")];
24 private ref array<ref SCR_DefendWaypointPreset> m_DefendPresets;
26 private int m_iCurrentDefendPreset;
29 array<string> GetTagsForSearch()
31 return m_DefendPresets[m_iCurrentDefendPreset].m_aTagsForSearch;
37 return m_DefendPresets[m_iCurrentDefendPreset].m_bUseTurrets;
41 int GetCurrentDefendPreset()
43 return m_iCurrentDefendPreset;
47 bool SetCurrentDefendPreset(
int newDefendPresetIndex)
49 if ((newDefendPresetIndex >= 0) && (newDefendPresetIndex < m_DefendPresets.Count()))
51 m_iCurrentDefendPreset = newDefendPresetIndex;
64 void SetFastInit(
bool isFastInit)
66 m_bFastInit = isFastInit;
70 override SCR_AIWaypointState CreateWaypointState(SCR_AIGroupUtilityComponent groupUtilityComp)
78 override void OnDeselected()
87 array<AIAgent> groupMembers = {};
88 myGroup.GetAgents(groupMembers);
90 AICommunicationComponent mailbox = myGroup.GetCommunicationComponent();
94 foreach (AIAgent receiver: groupMembers)
102 SCR_AIInfoComponent aiInfo = chimeraAgent.m_InfoComponent;
103 if (!aiInfo || !aiInfo.HasUnitState(EUnitState.IN_TURRET))
106 ChimeraCharacter character = ChimeraCharacter.Cast(receiver.GetControlledEntity());
107 if (character && character.IsInVehicle())
111 msg2.SetText(
"Waypoint was deselected, leave vehicle");
112 msg2.SetReceiver(receiver);
113 mailbox.RequestBroadcast(msg2, receiver);
117 myGroup.ReleaseCompartments();