I know this may have been asked before, but I’m having trouble finding the right solution. I’ve seen similar issues, but not this exact one.
I told the game to ask the player for some input (in this case, a color), which the game will then use to describe some items in the game.
I made this work by implementing an indexed text that varies called “player’s color.”
I then use that to alter the printed name of some items by saying the following:
The printed name of the hat is “[player’s color] hat”;
This works great. If the player inputs “scarlet” as his favorite color, later in the game he sees “a scarlet hat.”
Yay!
The problem is, if the player says “Take scarlet hat,” the parser doesn’t understand him.
That complaint made sense to me, so I tried the following:
Understand “[player’s color] hat” as the hat.
Inform didn’t like that.
After thinking about this some more, I realized I was basically trying to do what happens in Spellbreaker where the player can rename the cubes to whatever he wants and then use those names when interacting with them. I’ve been able to achieve the first part (renaming an object to whatever he wants) but not the second (using that name to interact with the object).
When I’ve looked for answers this question, they’ve all dealt with referring to objects by variable conditions (say, broken and fixed) or to some other new name that has been chosen by the author (such as changing an “old man” to “Mr. Olsen”). I can’t find anything that lets the player refer to objects by names chosen by the player.
Any help would be greatly appreciated.