Real-Time Delays

version 1/100607 by Erik Temple

  • Home page
  • Beginning
  • Previous
  • Next



  • Example: * The Chamber - A simple illustration of basic usage.

        "The Chamber"

        Include Real-Time Delays by Erik Temple.

        The Tanatalus Chamber is a room. The chocolate bar is in the chamber.

        Instead of taking the chocolate bar:
            say "You pause. Do you really want...[paragraph break]";
            if glulx timekeeping is supported:
                wait 2000 milliseconds before continuing;
            say "...God! Of course you do! You devour it without removing the wrapper.";
            remove the chocolate bar from play.

        Test me with "take bar".