Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SetCombatModeGroupCommand.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
5 [Attribute("-1", UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EAIGroupCombatMode))]
7
8 //------------------------------------------------------------------------------------------------
9 override bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition, int playerID, bool isClient)
10 {
11 if (isClient)
12 {
13 //place to place a logic that would be executed for other players
14 return true;
15 }
16
17 SCR_AIGroup slaveGroup = SCR_AIGroup.Cast(target);
18 if (!slaveGroup)
19 return false;
20
21 SCR_AIGroupUtilityComponent groupUtility = SCR_AIGroupUtilityComponent.Cast(slaveGroup.FindComponent(SCR_AIGroupUtilityComponent));
22
23 groupUtility.SetCombatMode(m_eCombatMode);
24
25 // Cancel suppressive fire waypoint if Hold Fire was ordered
26 if (m_eCombatMode == EAIGroupCombatMode.HOLD_FIRE)
27 {
28 array<AIWaypoint> currentWaypoints = {};
29 slaveGroup.GetWaypoints(currentWaypoints);
30 foreach(AIWaypoint currentwp : currentWaypoints)
31 {
32 if (SCR_SuppressWaypoint.Cast(currentwp))
33 slaveGroup.RemoveWaypoint(currentwp);
34 }
35 }
36
37 return true;
38 }
39
40 //------------------------------------------------------------------------------------------------
41 override bool CanBeShown()
42 {
44 return false;
45
46 SCR_PlayerControllerGroupComponent groupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
47 if (!groupController)
48 return false;
49
50 if (!CanRoleShow())
51 return false;
52
53 return true;
54 }
55}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SetCombatMode(EAIGroupCombatMode combatMode)
Sets combat mode as desired by external means, such as scenario, or commanding, or game master.
override bool CanBeShownInCurrentLifeState()
override bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition, int playerID, bool isClient)
SCR_FieldOfViewSettings Attribute