6 [
Attribute(
"0", UIWidgets.CheckBox,
"Should reset stance to Standing when node is aborted")]
7 private bool m_bStandupOnAbort;
9 static const string STANCE_PORT =
"Stance";
11 private CharacterControllerComponent m_CharacterController;
14 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
17 return ENodeResult.FAIL;
21 if(!GetVariableIn(STANCE_PORT,stance))
27 return ENodeResult.SUCCESS;
46 override bool VisibleInPalette() {
return true;}
49 protected static ref TStringArray s_aVarsIn = {
52 override array<string> GetVariablesIn()
58 override string GetNodeMiddleText()
66 override void OnInit(AIAgent owner)
70 if(owner.GetControlledEntity())
72 m_CharacterController = CharacterControllerComponent.Cast(owner.GetControlledEntity().FindComponent(CharacterControllerComponent));
74 NodeError(
this, owner,
"Can't find CharacterControllerComponent.");
79 override void OnAbort(AIAgent owner, Node nodeCausingAbort)
81 if (!m_bStandupOnAbort)
83 super.OnAbort(owner, nodeCausingAbort);
91 super.OnAbort(owner, nodeCausingAbort);