[I6] Differentiation between similar objects

Dear all,

I have a problem with Inform 6 again. I have three objects with the word “coffee” in it: A coffee machine, some coffee in a jar and a coffee filter. Since all three objects have ‘coffee’ as part of the name, the following happens:

put coffee in machine
Which do you mean, the coffee machine, some coffee in a jar or the coffee filter?

I obviously have an object “coffee machine” with name ‘coffee’ ‘machine’, an object “some coffee in a jar” with name ‘coffee’ ‘jar’ and an object “coffee filter” with name ‘coffee’ ‘filter’ and would like to be able to refer to the “coffee machine” etc., hence the multiple use of the name ‘coffee’. So, what can I do to distinguish between these objects in a way that “put coffee in machine” males the game know which object is which?

Thanks a lot and kind regards,

Grues

I wrote eblong.com/zarf/inftricks/tip_parsename.html many years ago. It doesn’t solve all of your problem but you should be able to massage it around.

I’ll go through that. Thanks already!

If I may, my extension PhraseNames allows you to do this fairly easily: for instance you’d mark “coffee” as an optional word in front of “filter”, which means “filter” and “coffee filter” would be recognized as the filter, but not just “coffee”. And after you include the extension it’s as easy as writing

phrase_name '.opt' 'coffee' 'filter'

(The phrase_name property is the one my extension defines.)

If you need any help or have any comments send me a PM - I’d be really happy if someone used this extension :slight_smile:

Parse_name did the trick, thanks Zarf! (And DON’T ask why it took me three months to implement it. :wink: Also thanks Mule, I’ll try that next time…