Heya all,
After building a little clothing system (with some help from you guys) for a prototype personal game, just to get used to Inform 7, I decided to make a quick “get dressed” command that throws the player into a default work outfit.
But I wanted to give the player a choice between one article of clothing, because I’ve never asked for input like this before and I’m still not really sure how to ask the player a question other than getting their name.
Here’s what I created:
[Quickly put clothes on at the start of the game]
GetDressed is an action applying to nothing.
Understand "Get dressed" as GetDressed.
Report GetDressed:
if the player is in Your Apartment:
now Your Closet is open;
if BDC shirt is visible:
now the player is wearing the BDC shirt;
if the Cotton Bra is visible:
now the player is wearing the Cotton Bra;
if the Cotton panties are visible:
now the player is wearing the Cotton panties;
say "Skirt or Shorts?";
now the command prompt is "Skirt or Shorts >";
To decide whether getting dressed:
if the command prompt is "Skirt or Shorts >", yes;
no.
After reading a command when getting dressed:
if the player's command matches "skirt":
say "[paragraph break][player forename] chooses the skirt and puts it on.";
if the BDC Skirt is visible:
now the player is wearing the BDC Skirt;
now the command prompt is ">";
otherwise:
say "That doesn't appear to be a choice.";
reject the player's command;
if the player's command matches "shorts":
say "[paragraph break][player forename] chooses the shorts and puts them on.";
if the BDC Shorts are visible:
now the player is wearing the BDC Shorts;
now the command prompt is ">";
otherwise:
say "That doesn't appear to be a choice.";
reject the player's command.
This appears to work fine, putting either shorts or a skirt on the player, provided the player is in their apartment and so are the clothing articles, aside from one issue.
Every time the player types either shorts or skirt, I get this little error beneath my say output:
Kara chooses the shorts and puts them on.
That's not a verb I recognise.
I think because the game is assuming the player is trying to do something, when they’re supposed to be asking a question. So I figured I’m doing something wrong here and wondering if anyone can give me advice; either to better set up a binary or multiple choice for the player, or to stop that verb error message from popping up.
Many thanks!