Room & Dimension

version 1 by Sebastian Rahn

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 3.2 - Moving action

    Tmp_Direction is a direction that varies.
    NoGo is a truth state that varies.
    Uncommented is a truth state that varies.

    Friendly person is a kind of person.
    Hostile Person is a kind of person.

    Check an actor going a direction (called destination) when Show Map is true(this is the moving actor rule):
    Change Compass to actor;
    Change Tmp_Direction to destination;
    turn around;
    check sector;
    If Freespace is a Wall
    begin;
    If Compass is player, say "[conditional paragraph break]You can't walk through walls.[line break]";
    If Compass is not player
    begin;
    If Uncommented is false, say "[conditional paragraph break][Compass] tries really hard to break through a wall but fails miserably.[line break]";
    end if;
    Change NoGo to true;
    end if;
    If Freespace is a hostile person
    begin;
    If Compass is player, say "[conditional paragraph break][Freespace] musters you with an hateful gaze and won't let you pass.[line break]";
    If Compass is not player
    begin;
    If Uncommented is false, say "[conditional paragraph break][Compass] can't manage to get passed [Freespace].[line break]";
    end if;
    Change NoGo to true;
    end if;
    If NoGo is true, stop the action;
    If Freespace is Entrance point
    begin;
    switch maps;
    stop the action;
    end if;
    move a sector;
    stop the action.