4 protected override bool TestFunction(AIAgent agent, IEntity controlled)
6 AIWaypoint waypoint = AIWaypoint.Cast(controlled);
13 Debug.Error(
"Running on AIAgent that is not a SCR_AIGroup group!");
17 array<AIAgent> agents = {};
19 EAIWaypointCompletionType completionType = waypoint.GetCompletionType();
21 switch (completionType)
23 case EAIWaypointCompletionType.All :
25 group.GetAgents(agents);
26 foreach (AIAgent a: agents)
28 ChimeraCharacter character = ChimeraCharacter.Cast(a.GetControlledEntity());
29 if (character && character.IsInVehicle())
37 case EAIWaypointCompletionType.Leader :
39 ChimeraCharacter character = ChimeraCharacter.Cast(group.GetLeaderEntity());
42 return !character.IsInVehicle();
44 case EAIWaypointCompletionType.Any :
46 group.GetAgents(agents);
47 foreach (AIAgent a: agents)
49 ChimeraCharacter character = ChimeraCharacter.Cast(a.GetControlledEntity());