Hi again. I used the ray-gun example as a template for creating an action where you can feed an animal.
This may or may not be an action that already exists, I should be able to accomplish it but apparently I can’t. The idea is that an angry racoon is blocking the way and you feed them to get them to move.
I imagine the most correct input to be “feed candyfloss to raccoon”. I’d probably have to allow “feed racoon with candyfloss as well.”
I’m lost as to the most efficient way to achieve this.
Feeding it to is an action applying to two things. Check feeding something to something: if the player is not carrying the candyfloss, say "You have no food a raccoon would eat!" instead; if the second noun is not the raccoon, say "[The second noun] is of no interest to a raccoon." instead; if the noun is not the raccoon, say "[noun]s are not here." instead; if the noun is the candyfloss, say "food can't eat food!" instead; if the noun is the player, say "It looks good but who'd eat food from a train roof!" instead. Understand "feed [candyfloss] to [something unraccoonlike]" as feeding it to (with nouns reversed). Definition: a thing is unraccoonlike if it is not the raccoon. Understand "feed [something unraccoonlike] with [candyfloss]" as feeding it to. Understand "feed [something] to [something]" as feeding it to (with nouns reversed). Carry out feeding something to something: say "Nom! [The noun] grabs the candyfloss and climbs down the tree! [if something is part of the noun][The list of things which are part of the noun] clatter to the ground! [end if][paragraph break]"; now every thing which is part of the noun is in the location. After feeding the candyfloss to the raccoon: say "The raccoon scampers away."; now the raccoon is nowhere.