Squeezng action

Squeeze or squeezing already is defined in Inform 7.
But I am having trouble getting it to work with my tube of toothpaste.

[code]Brushing teeth is an action applying to one visible thing.

Teeth is a part of player.

Removing is an action applying to one visible thing.

Understand “remove” as removing.

Check squeezing tube of toothpaste:
say “[if cap is on tube of toothpaste]You need to remove the cap first.”;
stop the action.

Check brushing teeth while player does not hold toothbrush:
say “You need a toothbrush for that.”;
stop the action.

Check brushing teeth while player does not hold tube of toothpaste:
say “You need toothpaste for that.”;
stop the action.

Check brushing teeth:
if player has not squeezed tube of toothpaste:
say “You need to put toothpaste on the toothbrush, man. Didn’t your mother teach you anything?”;
stop the action.[/code]

Error message:

Problem. In the sentence ‘if player has not squeezed tube of toothpaste’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘player has not squeezed tube of toothpaste’.

I was trying to match this phrase:

if (player has not squeezed tube of toothpaste - a condition):

But I didn’t recognise ‘player has not squeezed tube of toothpaste’.

Forget it. I think I have a work-around.

I think you could make that line work the way you intend by saying “If we have not squeezed the tube of toothpaste”–it has to be “we,” not “the player.” This is described in section 9.12 of the documentation, “Actions as conditions,” and then more in section 9.13, “The past and perfect tenses.” As it says in section 9.12, this will be true whenever any actor (not just the player) has successfully completed an action of squeezing the toothpaste.

It also seems to me that in this code you don’t have an Understand line that goes to the action of brushing teeth–and that you might want to make a simple brushing action that applies to the teeth (and that prints a polite refusal if you try to brush anything else).