AI Moving

version 1 by Sebastian Rahn

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 1.4 - Commanding a Chase

    To (Follow Runner - a thing) follows (Follow Goal - a thing):
    change Follow_Runner to Follow Runner;
    change Follow_Goal to Follow Goal;
    If Wallrunner of Follow_Runner is true
    begin;
    If Follow_Runner is connected with Follow_Goal
    begin;
    change Wallrunner of Follow_Runner to false;
    otherwise;
    change Follow_Richtung to Runner_Richtung of Follow_Runner;
    end if;
    end if;
    change Compass to Follow_Runner;
    start a chase;
    If Follow_Stop is false
    begin;
    change Follow_truth state to true;
    If Freespace is not Wall
    begin;
    move a sector;
    If Wallrunner of Follow_Runner is true, change Wallrunner of Follow_Runner to false;
    end if;
    If Freespace is Wall
    begin;
    use Obstacle Course;
    check sector;
    move a sector;
    end if;
    otherwise;
    If Wallrunner of Follow_Runner is true, change Wallrunner of Follow_Runner to false;
    end if.