Ask about...

I’m working on a game in which the main character has a companion who is a know it all. I’m programming it so that you can ask the know it all (whom we’ll call Ogre) about anything, but I thought typing “Ask Ogre About (something)” would get annoying. So I thought I would create a new command called “AOA” (Ask Ogre About), so the player can just type “AOA (something)” and get an answer.

How do I create this so that AOA applies only to Ogre?

Thanks,

Peter

In which IF language?

I’m using Inform 7.

The normal abbreviation is simply “a”. Have the game interpret “a topic” (and ‘ask topic’ - synonyms are easy in I7) as asking the specific person. If they’re not in the same place then show an error message.

If you use one of the conversation extensions (such as Eric Eve’s) you get the aforementioned A OGRE ABOUT ROCKS and T OGRE ABOUT MY FEELINGS. One addition to this is it keeps track of the “current interlocutor” which is the person you’re conversing with. So once you say hello to the Ogre, you can just type A ROCKS and T MY FEELINGS and the game knows you’re speaking to the Ogre.