Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_AISetBehaviorAllowLook.c
Go to the documentation of this file.
2{
3 [Attribute()]
4 protected bool m_bAllowLook;
5
6 private SCR_AIBehaviorBase m_CurrentBehavior;
7
8 //------------------------------------------------------------------------------------------------
9 override void OnEnter(AIAgent owner)
10 {
11 SCR_AIUtilityComponent utility = SCR_AIUtilityComponent.Cast(owner.FindComponent(SCR_AIUtilityComponent));
12 m_CurrentBehavior = utility.GetCurrentBehavior();
13 }
14
15 //------------------------------------------------------------------------------------------------
16 override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
17 {
19 return ENodeResult.FAIL;
20
21 m_CurrentBehavior.m_bAllowLook = m_bAllowLook;
22
23 return ENodeResult.SUCCESS;
24 }
25
26 //------------------------------------------------------------------------------------------------
27 protected static override bool VisibleInPalette() {return true;}
28
29 //------------------------------------------------------------------------------------------------
30 protected static override string GetOnHoverDescription() {return "Sets value of m_bAllowLook in current behavior.";}
31
32 //------------------------------------------------------------------------------------------------
33 override string GetNodeMiddleText()
34 {
35 return string.Format("Allow Look: %1", m_bAllowLook);
36 }
37};
void SCR_AIBehaviorBase(SCR_AIUtilityComponent utility, SCR_AIActivityBase groupActivity)
bool m_bAllowLook
override ENodeResult EOnTaskSimulate(AIAgent owner, float dt)
ref SCR_AIBehaviorBase m_CurrentBehavior
Used for avoiding constant casting, outside of this class use GetCurrentBehavior().
static override bool VisibleInPalette()
static override string GetOnHoverDescription()
ENodeResult
Definition ENodeResult.c:13
SCR_FieldOfViewSettings Attribute