Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4102536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:50:23+00:00 2026-05-20T20:50:23+00:00

Very new to Inform7 and it’s style. I have looked through the provided docs

  • 0

Very new to Inform7 and it’s style. I have looked through the provided docs and some internet browsing has yielded nothing for me… this is a simplistic version of what i’m looking for. I want to write something like this:

breakroom is a room. "A run of the mill breakroom."

soda pop is a kind of thing. "A refreshing soda pop."

soda machine is in the breakroom.  dispense button is on the soda machine.

instead of pushing dispense button:
    say "A soda can dispenses".
    create a soda pop (called pop) in the breakroom.

“create a soda pop (called pop) in the breakroom.” is not a valid command obviously, but I hope it conveys what I want to do. I don’t know how to instantiate objects at runtime. Can this be done reasonably? Any help would be appreciated. I am aware that there’s not a big following here for Inform but I figure i’d give it a shot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:50:24+00:00Added an answer on May 20, 2026 at 8:50 pm

    Inform doesn’t handle dynamic objects very well, but they’re often not the best approach anyway. Section 10.3. Dispensers and Supplies of Small Objects in the manual may be helpful.

    I think the best model for this is a physical one: create a limited supply of cans in the machine. For example:

    Breakroom is a room. "A run of the mill breakroom."
    
    A soda pop is a kind of thing.  The description is "A refreshing soda pop."
    
    The soda machine is in the breakroom.  It is fixed in place and transparent.
    The description is "Just an average soda machine, with a large dispense
    button."
    
    There are three soda pops in the soda machine.
    
    The dispense button is a part of the soda machine.
    
    Instead of pushing the dispense button:
            if a soda pop (called the can) is in the soda machine:
                    move the can to the breakroom;
                    say "A soda can dispenses.";
            otherwise:
                    say "The machine is empty, so nothing happens.".
    
    Test me with "look / x machine / push button / look / push button /
    push button / push button / look".
    

    (make the machine opaque rather than transparent if you prefer!). In the above, I’ve also tweaked the description of a soda pop — if you just say "Blah" rather than The description is "Blah" after an object definition, you set the initial description (printed as part of the room description) rather than the “examine” description, which I don’t think is what you want here — and I’ve made the button a “part” of the machine, rather than a separate object.

    The result:

    Welcome
    An Interactive Fiction
    Release 1 / Serial number 110324 / Inform 7 build 6G60 (I6/v6.32 lib 6/12N) SD
    
    Breakroom
    A run of the mill breakroom.
    
    You can see a soda machine (in which are three soda pops) here.
    
    >test me
    (Testing.)
    
    >[1] look
    Breakroom
    A run of the mill breakroom.
    
    You can see a soda machine (in which are three soda pops) here.
    
    >[2] x machine
    Just an average soda machine, with a large dispense button.
    
    In the soda machine are three soda pops.
    
    >[3] push button
    A soda can dispenses.
    
    >[4] look
    Breakroom
    A run of the mill breakroom.
    
    You can see a soda pop and a soda machine (in which are two soda pops) here.
    
    >[5] push button
    A soda can dispenses.
    
    >[6] push button
    A soda can dispenses.
    
    >[7] push button
    The machine is empty, so nothing happens.
    
    >[8] look
    Breakroom
    A run of the mill breakroom.
    
    You can see three soda pops and a soda machine (empty) here.
    
    >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

System.Collections.Concurrent has some new collections that work very well in multithreaded environments. However, they
Very new to python and can't understand why this isn't working. I have a
Im very new in C++ I have found this post http://msdn.microsoft.com/en-us/magazine/cc163486.aspx and trying to
I very new to Python, and fairly new to regex. (I have no Perl
Very new to this, and I have no idea where to start. I want
Very new to Business Objects, but I have a .NET background and PL/SQL background.
im very new to this and have a very basic knowledge php and SQL
Im very new to C programing, but have limited experience with Python, Java, and
Very new to Objective-C and Xcode and working my way through modifying the DrillDownApp
I'm very new to vaadin ( and to java). i have an table that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.