3 protected ref array<ref AIActionBase> m_aSubactions = {};
5 void GetSubactions(notnull array<AIActionBase> outSubactions)
8 foreach (
auto a : m_aSubactions)
9 outSubactions.Insert(a);
15 foreach (
auto a : m_aSubactions)
21 m_aSubactions.Insert(subaction);
26 subaction.OnActionSelected();
30 override float CustomEvaluate()
34 float maxPriority = 0;
35 int nValidActions = 0;
37 for (
int i = m_aSubactions.Count()-1; i >= 0; i--)
46 action.OnActionRemoved();
47 m_aSubactions.Remove(i);
52 action.OnActionRemoved();
53 m_aSubactions.Remove(i);
57 float priority = action.Evaluate() + action.EvaluatePriorityLevel();
58 if (priority > maxPriority)
59 maxPriority = priority;
66 if (nValidActions == 0)
75 override void OnActionSelected()
77 super.OnActionSelected();
86 action.OnActionSelected();
90 override void OnActionDeselected()
92 super.OnActionDeselected();
101 action.OnActionDeselected();
105 override void OnActionRemoved()
107 super.OnActionRemoved();
110 action.OnActionRemoved();