4 protected bool m_bRaised;
6 [
Attribute(defvalue:
"1", uiwidget: UIWidgets.CheckBox,
desc:
"When true, always returns running and executes on abort, otherwise executes on simulate.")]
7 private bool m_bKeepRunningUntilAborted;
9 protected CharacterControllerComponent m_CharacterController;
11 protected override bool VisibleInPalette()
16 override void OnInit(AIAgent owner)
18 IEntity controlledEntity = owner.GetControlledEntity();
21 m_CharacterController = CharacterControllerComponent.Cast(controlledEntity.FindComponent(CharacterControllerComponent));
25 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
28 return ENodeResult.FAIL;
30 if (m_bKeepRunningUntilAborted)
31 return ENodeResult.RUNNING;
34 return ENodeResult.SUCCESS;
37 override void OnAbort(AIAgent owner, Node nodeCausingAbort)
45 override string GetOnHoverDescription()
47 return "Sets raised mode of gadget, either on simulate or on abort.";