GotoWaypointAI

From Elite Wiki

Defined states:

  • GLOBAL: → NEW_WAYPOINT
  • GO_TO_WAYPOINT: → NEW_WAYPOINT
  • NEW_WAYPOINT: →GO_TO_WAYPOINT

Refered to AI's:


{
"GO_TO_WAYPOINT" = {
           ENTER = ();
           "WAYPOINT_SET" = ("setStateTo: NEW_WAYPOINT");
           "DESIRED_RANGE_ACHIEVED" = (exitAI);
           ATTACKED = (exitAI); 
            "INCOMING_MISSILE" = (exitAI); 
           EXIT = ();
           UPDATE = ("setSpeedFactorTo: 0.75", performFlyToRangeFromDestination, checkCourseToDestination);
           };
   "NEW_WAYPOINT" = {
           ENTER = ("setSpeedFactorTo: 0.0", "setDesiredRangeTo: 50.0", checkCourseToDestination);
           "WAYPOINT_SET" = ("setStateTo: NEW_WAYPOINT");
           "COURSE_OK" = ("setStateTo: GO_TO_WAYPOINT");
           "DESIRED_RANGE_ACHIEVED" = (exitAI);
            ATTACKED = (exitAI); 
           "INCOMING_MISSILE" = (exitAI); 
           EXIT = ();
           UPDATE = ();
           }; 
   GLOBAL = {ENTER = ("setStateTo: NEW_WAYPOINT"); EXIT = (); UPDATE = (); }; 
}

BACK