moving a selected number of items.

I’m having a little trouble with this. I need a code that will allow a player to say something like: “Use 3 tomatoes.” and then having something happen to that number of tomatoes. Any Ideas?

Depends on what you need to do. For most purposes, you can just define your new action as accepting plural nouns:

Frobbing is an action applying to one thing. Understand "frob [things]" as frobbing. Note [things] instead of [thing] in the understand text. This will allow you to say stuff like “frob 3 widgets”, and whatever you’ve defined the frobbing action to do will be separately applied to each of those three widgets.

Note that this only works if you intend “frob 3 widgets” to be equivalent to “frob widget” repeated three times (presumably you’ll have some code to ensure that, in the event of ambiguities, the frobbing action will preferentially select an unfrobbed widget). If you need the result of taking an action on a set of objects to be different from what the result would be if you took the action on each of those objects individually, things become more complicated.

and how can I program an Item so that there can be many of them? Right now I have it as a value, but I’d like to have it as just a regular item.

A widget is a kind of thing. The player carries three widgets.

It’s the first line that’s the key. If you don’t tell Inform that a widget is a kind of thing, it will assume that “the player carries three widgets” means that the player is carrying one item named “three widgets”.

This approach is only recommended if the number of widgets in your game is likely to be in the low dozens at most. If you need hundreds or thousands of identical items, other approaches are called for.

Thank you so much! Well… back to hiding under my bed with a laptop! Cheers :mrgreen: