Throwing Away action

I’d like to have a command that a player can say “Throw away [something]” or “Throw [something] away” to equate out to “Put [the noun] in the trashcan.” The trashcan is already a container in the room. The something or noun is anything that the person would be carrying.

I figured there’d already be something out there that already defines this; but I can’t find it nor figure it out on my own.

TIA,
Shannon

Something like this ought to get you started:


Understand "throw away [something]" as trashing.
Understand "throw [something] away" as trashing.

Trashing is an action applying to one carried thing.

Carry out trashing:
	try inserting the noun into the trash can.

Your complete “carry out” will need more than that eventually – this code doesn’t account for the fact that the player might not be near the trash can, for example.

Thank you.

That’s what I was looking for… I was using too many words I think as

Throwing it away is an action applying to one carried thing.

I think that could have been made to work, I just always try to come up with single word verbs to make it easier on myself!

Ah, I’ve run into this too – I think the issue is that you used “it” as part of defining your action, which I believe Inform only allows for actions that apply to two nouns (like “inserting it into” or “putting it on”). The documentation isn’t really clear on this unfortunately.

Last I remember “throw” was a synonym for “drop” so that might be interfering somehow.