Drop all silently

I have a situation where the player has been knocked unconscious. It is silly to think that when they awaken everything is still in their hands.

I have tried various ways of saying “Drop all silently” or “Try to drop all silently” since I don’t want a message to be printed that all was dropped. After a dozen attempts, I (once again) am going to be the lame newbie and ask.

How can I force all items to be dropped without it reporting the action on the screen?

“All” is only understood in commands from the player to the game, I think.
As author you need something like:

repeat with foo running through carried things:
	silently try dropping foo.

Untested code, so there may be small mistakes, but this should work:

To have the player lose his inventory: repeat with item running through things carried by the player: move item to the location.

Invoke with “have the player lose his inventory”.

(I suspect that Felix’s code will also drop all thing carried by other people?)

“now all things carried by the player are in the location” should work. (Not tested.)

You only need “try dropping silently” if you need to respect check/instead limitations on dropping objects. And you probably don’t.

Well the first two ideas compiled fine up to trying to invoke “have the player lose his inventory” where Inform complained about verbs.

“…but I can’t find a verb here that I know how to deal with, so I am ignoring this sentence altogether.”

And using “Now all things carried by the player are in the location.” causes 4 problems with the Conversation Framework extension to occur.

Hmmmmm… there has to be away. I am going to keep playing with it, if you have any other ideas I would love to hear them. And if I come up with anything I’ll let you know.

I don’t understand how that is possible? This example game compiles perfectly fine on my system:

[code]“Test” by Victor Gijsbers

Test is a room.

The player carries an apple. The player carries a pear.

To have the player lose his inventory:
repeat with item running through things carried by the player:
move item to the location.

Every turn:
have the player lose his inventory.[/code]

This is most often caused by using a full stop instead of a semicolon inside a block. You probably have something like this:

When the knockout scene begins:
	say "Some thug hits you in the head and everything goes dark!";
	now the player is in the basement.  [<-- should be a semicolon]
	have the player lose his inventory.

I went to look, and no… it wasn’t a period. So I kept trying things. Then I looked a little closer… AHHHHHHHHH!!! :open_mouth:

50 year old eyes… it was a colon. My only excuse is age, and that it is a notebook computer. I think I need a larger screen. :wink:

Thanks again everyone. You all are great for taking the time to help out like you do! I have learned so much reading this forum, even things I have no need for yet… it all helps add to the total sum of knowledge. I owe you all a beer.

I always fall into that trap, and I was pretty sure your suspicion was right; but, when I tested it, “things that are carried” only quantified over the things carried by the player (at least in this context); to move other people’s possessions I had to write “things that are carried by someone”. A little surprising, perhaps - at least to me …

This, by the way, is not strictly true.
Authors can use “all” in the source text in at least one context: testing if all things of a kind fulfill some condition (as in “if all doors are closed:” etc. etc.).