3 static const string PORT_ACTIVITY_TREE =
"ActivityTree";
4 static const string PORT_UPDATE_ACTIVITY =
"UpdateActivity";
6 SCR_AIGroupUtilityComponent m_UtilityComponent;
11 override void OnInit(AIAgent owner)
14 m_UtilityComponent = SCR_AIGroupUtilityComponent.Cast(owner.FindComponent(SCR_AIGroupUtilityComponent));
18 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
21 if (!m_UtilityComponent)
23 return NodeError(
this, owner,
"Group utility component is missing.");
26 SCR_AIActionBase currentAction = m_UtilityComponent.EvaluateActivity(restartActivity);
30 return ENodeResult.FAIL;
36 SetVariableOut(PORT_ACTIVITY_TREE, currentAction.m_sBehaviorTree);
37 SetVariableOut(PORT_UPDATE_ACTIVITY, restartActivity);
40 return ENodeResult.SUCCESS;
43 return ENodeResult.FAIL;
47 protected static ref TStringArray s_aVarsOut = {
51 override TStringArray GetVariablesOut()
57 override bool VisibleInPalette() {
return true;}