It’s funny how something you think is going to be very simple in Inform ends up taking about 5 hours and about 260 error messages!
This little problem came up when I started playing with the ‘duplicates’ feature as outlined in Chapter 4.13.
The idea seems to be to create a type (a shape is a kind of thing) and then something within that class (a square is a kind of shape). This then allows you to tell Inform “three squares are in the lab” which will create three objects which the player can then take any number of - “take one square”, “take two squares”, “take all squares”
This was all going fine until I wanted to make a box of matches and then destroy/move/remove from play individual matches which have been burned.
my current set up is;
this creates; Problem. You wrote ‘now the match is in room 0’ : but this is not explicit enough, and should set out definite relationships between specific things, like ‘now the cat is in the bag’, not something more elusive like ‘now the cat is carried by a woman.’ (Which woman? That’s the trouble.)
I’ve tried 'move the noun to room 0 (which moves the lamp), or move the second noun (which causes a runtime error crash).
there’s several ways I’ve tried getting rid of the used match, room 0 is the location I normally used for storing objects which are out-of-play, even though I know there’s a command for out-of-play. Ideally once the match is struck I’d like it to burn for 1 turn then disappear from the inventory or become used and have its description change to ‘match (used)’ or something, but having a 6 unused matches and six used is going to get messy.
all a bit of a muddle, sorry - I’m sure there’s a much simpler way of doing all this!