Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIGroupCombatModeAttribute.c
Go to the documentation of this file.
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
17 return null;
18
19 EAIGroupCombatMode combatMode = utility.GetCombatModeExternal();
20
21 int index = ConvertValueToIndex(combatMode);
22 if (index != -1)
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}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_EditableGroupComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
EAIGroupCombatMode GetCombatModeExternal()
See SetCombatMode.
void SetCombatMode(EAIGroupCombatMode combatMode)
Sets combat mode as desired by external means, such as scenario, or commanding, or game master.
static SCR_BaseEditorAttributeVar CreateInt(int value)
Attribute base for Name, icon and float value for other attributes to inherent from.
bool ValidateEnumValues(typename enumType, bool checkEnumCount=true)