Automap

version 4 by Mark Tilford

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 5 - Hyperlink specific stuff (for use with Basic Hyperlinks by Emily Short)

    [To set linked room to (x - a number):
        say "[set link x]".
        
    To end linked room:
        say "[end link]".]

    [copied from Safari Guide by Emily Short ch 16.10 ]
    Hyperlink moving to room is an action applying to one thing.

    Check hyperlink moving to room:
        if the noun is the location, say "You're already in [the location]." instead.
        
    Carry out hyperlink moving to room:
        while the player is not in the noun:
            let heading be the best route from the location to the noun through visited rooms, using even locked doors;
            if heading is not a direction, say "You can't think how to get there from here." instead;
            let destination be the room heading from the location;
            say "(heading [heading])[command clarification break]";
            try going heading;
            if the player is not in the destination, rule fails.

    To decide what room is the glulx equivalent of (n - a number):
        (- {n} -)
        
    To decide whether (n - a number) codes a glulx object:
        (- (metaclass({n}) == Object) -)