Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_SetCombatModeGroupCommand.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
2
[
BaseContainerProps
(),
SCR_BaseGroupCommandTitleField
(
"m_sCommandName"
)]
3
class
SCR_SetCombatModeGroupCommand
:
SCR_BaseGroupCommand
4
{
5
[
Attribute
(
"-1"
,
UIWidgets
.ComboBox, enums: ParamEnumArray.FromEnum(
EAIGroupCombatMode
))]
6
protected
EAIGroupCombatMode
m_eCombatMode
;
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
{
43
if
(!
CanBeShownInCurrentLifeState
())
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
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
EAIGroupCombatMode
EAIGroupCombatMode
Definition
SCR_AIGroupUtilityComponent.c:6
IEntity
Definition
IEntity.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
SCR_AIGroupUtilityComponent::SetCombatMode
void SetCombatMode(EAIGroupCombatMode combatMode)
Sets combat mode as desired by external means, such as scenario, or commanding, or game master.
Definition
SCR_AIGroupUtilityComponent.c:140
SCR_BaseGroupCommand
Definition
SCR_BaseGroupCommand.c:4
SCR_BaseGroupCommand::CanRoleShow
override bool CanRoleShow()
Definition
SCR_BaseGroupCommand.c:44
SCR_BaseGroupCommand::CanBeShownInCurrentLifeState
override bool CanBeShownInCurrentLifeState()
Definition
SCR_BaseGroupCommand.c:101
SCR_BaseGroupCommandTitleField
Definition
SCR_PlayerCommandsConfig.c:155
SCR_SetCombatModeGroupCommand
Definition
SCR_SetCombatModeGroupCommand.c:4
SCR_SetCombatModeGroupCommand::m_eCombatMode
EAIGroupCombatMode m_eCombatMode
Definition
SCR_SetCombatModeGroupCommand.c:6
SCR_SetCombatModeGroupCommand::Execute
override bool Execute(IEntity cursorTarget, IEntity target, vector targetPosition, int playerID, bool isClient)
Definition
SCR_SetCombatModeGroupCommand.c:9
SCR_SetCombatModeGroupCommand::CanBeShown
override bool CanBeShown()
Definition
SCR_SetCombatModeGroupCommand.c:41
UIWidgets
Definition
attributes.c:40
vector
Definition
vector.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Commanding
Commands
SCR_SetCombatModeGroupCommand.c
Generated by
1.17.0