8 ref array<ref SCR_ScenarioFrameworkDamageContextConditionBase> m_aDamageContextConditions;
10 [
Attribute(
desc:
"Actions to be executed if conditions' evaluation is successful.")]
11 ref array<ref SCR_ScenarioFrameworkActionBase> m_aActions;
22 if (!ValidateInputEntity(
object, m_Getter, m_Entity))
25 AIGroup group = AIGroup.Cast(m_Entity);
28 SetupInvoker(m_Entity);
32 array<AIAgent> agents = {};
33 group.GetAgents(agents);
36 foreach (AIAgent agent : agents)
38 controlledEntity = agent.GetControlledEntity();
40 SetupInvoker(controlledEntity);
45 void SetupInvoker(
IEntity object)
47 SCR_DamageManagerComponent objectDmgManager = SCR_DamageManagerComponent.GetDamageManager(
object);
48 if (!objectDmgManager)
51 objectDmgManager.GetOnDamage().Remove(OnDamage);
52 objectDmgManager.GetOnDamage().Insert(OnDamage);
62 if (!EvaluateConditions(damageContext))
67 actions.OnActivate(m_Entity);
72 override array<ref SCR_ScenarioFrameworkActionBase> GetSubActions()
74 array<ref SCR_ScenarioFrameworkActionBase> allActions = {};
78 allActions.Insert(action);
87 switch (m_eActivationConditionLogic)
90 return EvaluateConditionsAND(damageContext);
93 return EvaluateConditionsOR(damageContext);
96 return EvaluateConditionsNAND(damageContext);
99 return EvaluateConditionsXOR(damageContext);
108 if (m_aDamageContextConditions.IsEmpty())
113 if (!action.Init(damageContext))
125 if (action.Init(damageContext))
135 return !EvaluateConditionsAND(damageContext);
141 bool priorSuccess =
false;
144 bool success = action.Init(damageContext);
145 if (priorSuccess && success)
148 priorSuccess |= success;