3 protected PerceptionComponent m_PerceptionComponent;
5 protected ref Shape m_FriendlyAimShape;
7 protected override bool TestFunction(AIAgent owner)
14 if (friendlyEntInAim && DiagMenu.GetBool(
SCR_DebugMenuID.DEBUGUI_AI_SHOW_FRIENDLY_IN_AIM))
15 m_FriendlyAimShape = Shape.CreateSphere(COLOR_RED, ShapeFlags.NOOUTLINE|ShapeFlags.NOZBUFFER|ShapeFlags.TRANSP, friendlyEntInAim.GetOrigin() + Vector(0, 2, 0), 0.1);
17 m_FriendlyAimShape =
null;
20 return friendlyEntInAim !=
null;
23 override protected void OnInit(AIAgent owner)
25 IEntity ent = owner.GetControlledEntity();
28 NodeError(
this, owner,
"SCR_AIIsFriendlyInAim must be used with soldiers");
33 NodeError(
this, owner,
"Didn't find PerceptionComponent");
36 protected override string GetOnHoverDescription()
38 return "SCR_AIIsFriendlyInAim: Returns true when we have a friendly unit in aim. Used for checking against friendly fire.";