Repeat Through Actions

version 2 by Ron Newcomb

  • Home page
  • Beginning
  • Previous



  • Example: * Discover Yourself - Introduces actions to the player via bolded text

        "Discover Yourself"
        
        Include Repeat Through Actions by Ron Newcomb.
        
        When play begins:
            repeat with act running through every initially allowed action begin;
                choose a blank row in the table of allowed actions;
                change the possibility entry to the act;
            end repeat.
            
        Looking is initially allowed.
        Examining is initially allowed.
        
        Table of allowed actions
      possibility  
      an action-name  
      with 100 blank rows.   
        
        Before doing something when the action-name part of the current action is not a possibility listed in the table of allowed actions, say "You haven't learned that ability yet." instead.
        
        Test me with " i / x me / x me / i / think / i / think / wake / look / x me"
        
        Dreamland is a room.
        
        Instead of examining yourself for the first time, say "Ah! You have a body! And a mind! Might [introduce a thinking action] or [introduce the waking up action] now be possible?"
        
        Instead of thinking for the first time, say "What a great idea! Thinking seems very useful. You can use it for [introduce the taking inventory action] of yourself, and your possessions."
        
        Instead of thinking:
            say "You think about all the things you've learned recently: ";
            repeat through the table of allowed actions begin;
                say "[possibility entry], ";
            end repeat;
            say "and who knows what the future may hold!"
        
        Instead of waking up for the first time: change the printed name of Dreamland to "Your Bed"; say "You awaken. [Introduce A Looking Action] around is almost destined."
        
        To say introduce (act - an action-name):
            say "[bold type][act][roman type]";
            if act is not a possibility listed in the table of allowed actions begin;
                choose a blank row in the table of allowed actions;
                change the possibility entry to the act;
            end if.