4 private static const float EXPLOSION_OBSERVE_DISTANCE = 220;
6 void CreateObserveUnknownBehavior(SCR_AIUtilityComponent utility, vector observeReactionPosition)
8 if (observeReactionPosition == vector.Zero || utility.m_CombatComponent.GetCurrentTarget() !=
null)
11 vector myOrigin = utility.m_OwnerEntity.GetOrigin();
17 if (investigateBehavior && investigateBehavior.GetActionState() ==
EAIActionState.RUNNING)
21 if (oldObserveBehavior)
25 utility.AddAction(observeBehavior);
29 override bool PerformReaction(notnull SCR_AIUtilityComponent utility, notnull
SCR_AIThreatSystem threatSystem, AIDangerEvent dangerEvent)
31 IEntity ownerEntity = utility.m_OwnerEntity;
36 vector
position = dangerEvent.GetPosition();
43 threatSystem.ThreatExplosion(
distance);
49 if (
distance <= EXPLOSION_OBSERVE_DISTANCE)
50 CreateObserveUnknownBehavior(utility,
position);