3 protected static const string PORT_STANCE =
"Stance";
4 protected static const string PORT_MOVEMENT_TYPE =
"MovementType";
6 protected SCR_AIUtilityComponent m_Utility;
8 protected static ref TStringArray s_aVarsOut = {
12 override TStringArray GetVariablesOut()
17 override bool VisibleInPalette()
22 override string GetOnHoverDescription()
24 return "Returns stance and movement type while advancing towards enemy";
27 override void OnInit(AIAgent owner)
29 m_Utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
31 NodeError(
this, owner,
"Utility component not found");
34 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
36 SCR_AIUtilityComponent utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
39 return ENodeResult.FAIL;
41 EAIThreatState threat = m_Utility.m_ThreatSystem.GetState();
47 case EAIThreatState.VIGILANT:
48 case EAIThreatState.SAFE:
55 case EAIThreatState.ALERTED:
56 case EAIThreatState.THREATENED:
65 SetVariableOut(PORT_MOVEMENT_TYPE, moveType);
66 return ENodeResult.SUCCESS;