I’m trying to find a way to save some typing in a game with lots of conversation. I am typing lots of “[otherwise if the current interlocutor is George]”
I usually will make substitutions for stuff like this, such as:
To say p: say "[paragraph break]"
Which allows me to type things like. “And my paragraph has ended.[p]In this new paragraph…”
I was trying to make a similar shortcut with things like:
To say intG: say "[if the current interlocutor is George]"
Which doesn’t work since that whole phrase is not a specific thing to say.
Is there a way I can dip into I6 maybe and create shortcuts for at least the phrase “the current interlocutor is” so I can save some typing and space for phrases like:
"[if int George]George says, 'I'm the current interlocutor!'"
This works awesomely. Thank you! I don’t know if it’s just that particular phrase “current interlocutor” that irks me, but this technique will streamline a lot of things.
What I did was make one of these phrases for each character. Now I can write “[if George is int]…”
Blecki’s example already handles each (person) character. (It may not have been obvious, but “Bob” in his code sample was a local variable, not a person object.)
In most programming languages, I avoid one-character variables like rotten fish, because they’re too easy to confuse with punctuation symbols. But in Inform, the code is verbose and has few symbols, so I always use single-letter variables for locals and arguments. Thus: