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_AIGroupCombatModeAttribute.c
Go to the documentation of this file.
1
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
2
class
SCR_AIGroupCombatModeAttribute
:
SCR_BaseFloatValueHolderEditorAttribute
3
{
4
//------------------------------------------------------------------------------------------------
5
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
6
{
7
SCR_EditableGroupComponent
editableGroupComponent =
SCR_EditableGroupComponent
.Cast(item);
8
9
if
(!editableGroupComponent)
10
return
null;
11
12
SCR_AIGroupUtilityComponent
utility =
SCR_AIGroupUtilityComponent
.Cast(editableGroupComponent.GetOwner().FindComponent(
SCR_AIGroupUtilityComponent
));
13
if
(!utility)
14
return
null;
15
16
if
(!
ValidateEnumValues
(
EAIGroupCombatMode
,
true
))
17
return
null;
18
19
EAIGroupCombatMode
combatMode = utility.
GetCombatModeExternal
();
20
21
int
index
=
ConvertValueToIndex
(combatMode);
22
if
(
index
!= -1)
23
return
SCR_BaseEditorAttributeVar
.
CreateInt
(
index
);
24
25
return
null;
26
}
27
28
//------------------------------------------------------------------------------------------------
29
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
30
{
31
SCR_EditableGroupComponent
editableGroupComponent =
SCR_EditableGroupComponent
.Cast(item);
32
33
if
(!editableGroupComponent)
34
return
;
35
36
SCR_AIGroupUtilityComponent
utility =
SCR_AIGroupUtilityComponent
.Cast(editableGroupComponent.GetOwner().FindComponent(
SCR_AIGroupUtilityComponent
));
37
if
(!utility)
38
return
;
39
40
int
index
= var.
GetInt
();
41
42
float
combatModeFloat;
43
if
(!
ConvertIndexToValue
(
index
, combatModeFloat))
44
return
;
45
46
EAIGroupCombatMode
combatMode = combatModeFloat;
47
48
utility.
SetCombatMode
(combatMode);
49
}
50
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
EAIGroupCombatMode
EAIGroupCombatMode
Definition
SCR_AIGroupUtilityComponent.c:6
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition
SCR_DestructionSynchronizationComponent.c:17
SCR_EditableGroupComponent
void SCR_EditableGroupComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_EditableGroupComponent.c:881
SCR_AIGroupCombatModeAttribute
Definition
SCR_AIGroupCombatModeAttribute.c:3
SCR_AIGroupUtilityComponent
Definition
SCR_AIGroupUtilityComponent.c:18
SCR_AIGroupUtilityComponent::GetCombatModeExternal
EAIGroupCombatMode GetCombatModeExternal()
See SetCombatMode.
Definition
SCR_AIGroupUtilityComponent.c:147
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_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateInt
static SCR_BaseEditorAttributeVar CreateInt(int value)
Definition
SCR_BaseEditorAttributeVar.c:107
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_BaseFloatValueHolderEditorAttribute
Attribute base for Name, icon and float value for other attributes to inherent from.
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:4
SCR_BaseFloatValueHolderEditorAttribute::ConvertIndexToValue
bool ConvertIndexToValue(int index, out float outValue)
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:28
SCR_BaseFloatValueHolderEditorAttribute::ValidateEnumValues
bool ValidateEnumValues(typename enumType, bool checkEnumCount=true)
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:39
SCR_BaseFloatValueHolderEditorAttribute::ConvertValueToIndex
int ConvertValueToIndex(float value)
Definition
SCR_BaseFloatValueHolderEditorAttribute.c:16
scripts
Game
Editor
Containers
Attributes
SCR_AIGroupCombatModeAttribute.c
Generated by
1.17.0