All Items in the Basket

Hi folks,

I’m trying to set up a supermarket full of objects (all tagged ‘groc’ and ‘unpaid’) with a security guard who arrests you if you try shoplifting any unpaid groc and a checkout girl who takes your shopping basket (a container carried by the player) and moves all the groc in the basket (or all groc carried by the player) to a carrier bag (another container) and makes them paid.

The sticking point I have at the moment is using: move all groc in the shopping basket

or move all items in the shopping basket or move all groc carried by the player or anything of this nature.

It seems I can ‘move’ specific named objects but I can’t figure out a way of ‘moving’ a class of objects or a group of non-specific things.

Any ideas?

Use a loop:

	repeat with goods running through groc in the basket:
		move goods to the bag.

Use now (section 8.11 has an almost identical example)

now all groc things in the basket are in the bag; now all groc things in the bag are paid;

That’s it, wow what a useful command. Why not just use it for everything?

You guys are the best!