Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AISetBehaviorInterruptable.c
Go to the documentation of this file.
2{
3 [Attribute("true", UIWidgets.CheckBox, "IsInterruptable")]
4 private bool m_IsInterruptable;
5
6 //------------------------------------------------------------------------------------------------
7 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
8 {
9 SCR_AIActionBase action = GetExecutedAction();
10
11 if (!action)
12 return ENodeResult.FAIL;
13
14 action.SetActionInterruptable(m_IsInterruptable);
15 return ENodeResult.SUCCESS;
16 }
17
18 //------------------------------------------------------------------------------------------------
19 protected static override bool VisibleInPalette()
20 {
21 return true;
22 }
23
24 //------------------------------------------------------------------------------------------------
25 protected static override string GetOnHoverDescription()
26 {
27 return "Sets behavior to be /not be interruptable by another behavior";
28 }
29
30 //------------------------------------------------------------------------------------------------
31 protected override string GetNodeMiddleText()
32 {
33 if (m_IsInterruptable)
34 return "INTERRUPTABLE";
35 else
36 return "NOT INTERRUPTABLE";
37 }
38};
SCR_AIActionBase GetExecutedAction()
Returns current action from the utility component.
ENodeResult
Definition ENodeResult.c:13
SCR_FieldOfViewSettings Attribute