I think you’re having trouble with stopping the action at appropriate times. Here’s some sample code:
[code]“Brushing Teeth”
The Bathroom is a room. “This is a spartan, but functional half-bathroom. You see a grimy sink in one corner with a toilet next to it.”
The sink is in the bathroom. On it is a tube of toothpaste and a toothbrush. The sink is fixed in place and scenery. “A porcelain pedestal sink that is probably supposed to be white, but has been turned a dull grey by a thick layer of tacky grime.”
Understand “brush” as toothbrush. The toothbrush is either empty or full. The toothbrush is empty. The description of the toothbrush is “This well-used toothbrush is a nest of matted, bent bristles with bits of goo mashed in between. But it’s the only one you have. [if full]There is a small squiggle of toothpaste on the brush.”
The description of the tube is “The tube of toothpaste is completely white and curled up like a snail’s shell. If you squeeze hard, you can probably get one last brushing out of it.”
Understand “teeth” as yourself.
Check squeezing tube of toothpaste:
if the player does not carry the toothbrush:
say “Squeezeing toothpaste onto the floor would just make a mess.”;
stop the action.
Carry out squeezing the tube of toothpaste:
now the toothbrush is full.
Report squeezing the tube of toothpaste:
say “You squeeze a bit of toothpaste onto the brush.”;
stop the action.
Brushing is an action applying to one thing. Understand “brush [something]” as brushing.
Report brushing: say “I don’t know how to brush that.”
Check brushing yourself:
if the player does not carry the toothbrush:
say “You can’t brush your teeth without a toothbrush.”;
stop the action;
if the toothbrush is empty:
say “You need to put some toothpaste on the brush first.”;
stop the action.
Report brushing yourself:
say “Your pearly whites just got whiter.”;
stop the action.
test me with “brush teeth / get tube / squeeze tube / get brush / brush teeth / x brush / squeeze tube / x brush / brush teeth”.[/code]