Grouped Messages As Dialogue

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • section 9b - Setting the game error and Observe statements

    To set (ge - a library-message) to (x - a library-message-value):
        now the message of ge is x;
        consider the categorizing errors rulebook.

    To say observe (x - a library-message): if x is observed, do nothing.
    To observe (x - a library-message): if x is observed, do nothing.
    To say (character - a person) observes/observe (x - a library-message): let o be the observer; change the observer to the character; if x is observed, do nothing; change the observer to o.
    To (character - a person) observes/observe (x - a library-message): let o be the observer; change the observer to the character; if x is observed, do nothing; change the observer to o.

    To decide whether (id - a library-message) is observed:
        consider the print library message rule;
        if cull inform default messages is 0 begin;
            decide no;
        otherwise;
            change cull inform default messages to 0;
            decide yes;
        end if.

    To say observe (x - a library-message-value): set game error to x; if x is observed, do nothing.
    To observe (x - a library-message-value): set game error to x; if x is observed, do nothing.
    To say (character - a person) observes/observe (x - a library-message-value): set game error to x; let o be the observer; change the observer to the character; if x is observed, do nothing; change the observer to o.
    To (character - a person) observes/observe (x - a library-message-value): set game error to x; let o be the observer; change the observer to the character; if x is observed, do nothing; change the observer to o.

    To decide whether (id - a library-message-value) is observed:
        set game error to id;
        if game error is observed, decide yes;
        otherwise decide no.


    To say defer to/-- (character - a person): if cannot defer to character, do nothing.
    To defer to/-- (character - a person): if cannot defer to character, do nothing.

    To decide whether cannot defer to (character - a person):
        if character is in the location begin;
            let save cull value be cull inform default messages;
            [now the current interlocutor is the character;]
            character observes game error;
            now cull inform default messages is save cull value;
            decide no;
        otherwise;
            decide yes;
        end if.