How do you put in an object in the middle of a play?

I know this is an amateurish, i tried to figure it out myself but i only find the way to remove objects. What should I write to introduce an object in to the play after doing some actions?

another question is why can’t i write about putting objects “in” something?
for example:

Ag is a container.

Instead of putting the Ba in Ag:
increase the score by 1;

there comes the problem

Problem. You wrote ‘Instead of putting the button in Ahg’ , which seems to introduce a rule taking effect only if the action is ‘putting the button in Ahg’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.

See the manual: 7.1 > Actions

but if I write

Ag is a container.

Instead of putting the Ba on Ag:
increase the score by 1;

it works

I can put Ba in Ag in the play, so why there’s a problem writing that in the code?

I forgot to mention i was using inform7

The “putting in” action is actually called “inserting it into”, so:

Instead of inserting Ba into Ag: ....
You can find the names of actions from the Actions tab in the index or by typing ACTIONS in the game and then trying the action.

Objects can be moved around with “now … is in …” (see ch. 8.11 in the manual).

Instead of inserting Ba into Ag: say "The Ba turns in to a Cy!"; remove Ba from play; now Cy is in Ag.

If the question is how to introduce an object that wasn’t there before, can you not create a hidden room (connected to nothing) and put all of the hidden objects in there. As soon as needed, you just move them into place and there they appear. :slight_smile:

Don’t know whether that helps.

I believe you don’t actually have to use a hidden room. You can just say “A gadget is a thing.” which creates an offstage gadget. When you want to bring it into play, “Now the gadget is in the bedroom.” brings it into the bedroom.

Robert Rothman

Indeed. :slight_smile:

:smiley: thanks alot. I was introduced to interactive fiction recently and I found that this kind of game is really suitable for me since I enjoyed reading.