3 SCR_AIUtilityComponent m_Utility;
10 static const float PRIO_ENEMY_TARGET = 80;
11 static const float PRIO_UNKNOWN_TARGET = 50;
12 static const float PRIO_DANGER_EVENT = 20;
14 protected float m_fPriority;
21 void LookAt(vector pos,
float priority,
float duration = 0.8)
24 AddDebugMessage(
string.Format(
"LookAt: pos: %1, priority: %2/%3", pos, priority,
m_fPriority));
32 m_bRestartLook =
true;
39 void LookAt(IEntity ent,
float priority,
float duration = 0.8)
42 AddDebugMessage(
string.Format(
"LookAt: ent: %1, priority: %2/%3", ent, priority,
m_fPriority));
50 m_bRestartLook =
true;
53 ent.GetBounds(min, max);
62 AddDebugMessage(
string.Format(
"Cancel"));
72 AddDebugMessage(
string.Format(
"Complete"));
80 protected void AddDebugMessage(
string str, LogLevel logLevel = LogLevel.NORMAL)
82 SCR_AIInfoBaseComponent infoComp = m_Utility.m_AIInfo;
89 bool canLook =
m_vPosition != vector.Zero && (!m_Utility.m_CurrentBehavior || m_Utility.m_CurrentBehavior.m_bAllowLook);
91 node.SetVariableOut(node.PORT_LOOK, canLook);
93 node.SetVariableOut(node.PORT_CANCEL, m_bCancelLook);
94 m_bCancelLook =
false;
96 node.SetVariableOut(node.PORT_RESTART, m_bRestartLook);
97 m_bRestartLook =
false;
102 node.SetVariableOut(node.PORT_POSITION,
m_vPosition);
103 node.SetVariableOut(node.PORT_DURATION,
m_fDuration);
106 return ENodeResult.SUCCESS;