Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AIDecoCombatMode.c
Go to the documentation of this file.
2{
3 [Attribute("0", UIWidgets.ComboBox, "", enums:ParamEnumArray.FromEnum(EAIGroupCombatMode) )]
5
6 protected SCR_AICombatComponent m_CombatComponent;
7
8 //-------------------------------------------------------------------
9 protected override bool TestFunction(AIAgent owner)
10 {
11 SCR_AIGroup group = SCR_AIGroup.Cast(owner);
12
13 // Group
14 if (group)
15 {
17 }
18
19 // Soldier
21 {
22 IEntity controlledEntity = owner.GetControlledEntity();
23 if (controlledEntity)
24 m_CombatComponent = SCR_AICombatComponent.Cast(controlledEntity.FindComponent(SCR_AICombatComponent));
25 }
26
28 return false;
29
30 return m_CombatComponent.GetCombatMode() == m_eCombatMode;
31 }
32
33 //-------------------------------------------------------------------
34 protected static override bool VisibleInPalette()
35 {
36 return true;
37 }
38
39 //-------------------------------------------------------------------
40 protected static override string GetOnHoverDescription()
41 {
42 return "Checks if agent is in this combat mode. Works both for soldier and group.";
43 }
44
45 //-------------------------------------------------------------------
46 override string GetNodeMiddleText()
47 {
48 return "Combat mode: " + typename.EnumToString(EAIGroupCombatMode, m_eCombatMode);
49 };
50};
proto external Managed FindComponent(typename typeName)
static override bool VisibleInPalette()
static override string GetOnHoverDescription()
override string GetNodeMiddleText()
SCR_AICombatComponent m_CombatComponent
EAIGroupCombatMode m_eCombatMode
override bool TestFunction(AIAgent owner)
SCR_AIGroupUtilityComponent GetGroupUtilityComponent()
EAIGroupCombatMode GetCombatModeActual()
Returns actual combat mode. See comment to EvaluateCombatMode method.
SCR_FieldOfViewSettings Attribute