Help with rules and actions and knitting

I hate to ask such a broad question, but I’ve poured through the manuals a hundred times and I seem to be missing something regarding actions and rules. Any help would be greatly appreciate. I want the player to order characters to knit things for each other, and I’d the player to observe who’s knitting what for who, every turn that the knitting is happening. So…

  1. I establish the action:
    Knitting is an action applying to one visible thing. Understand “Knit [something]” as knitting.

  2. I establish the command:
    Instead of asking somebody to try knitting something, say “[the person asked] knits [noun].”.

So my question is, for every turn that the knitting is happening, how do I make Inform print the line “Paul is knitting Sarah’s new hat?” Is the problem that I have to establish that the knitting takes place over more than one turn? Or is the problem that I’m using “Instead of…?” Is there a way to make the characters continuously knit until they are given a new command?

Thanks so much for your help.

Continuous actions are a bit tricky, because Inform doesn’t really have a concept of continuous action. Actions usually ask for one turn, then finish.

You could look at the extension Problem-Solving Characters if you’re going to have a lot of continuous actions. If you don’t want to use an extension, try this for starters.

Knitting is an action applying to nothing and requiring light. Understand "knit" as knitting.
Ceasing to knit is an action applying to nothing. Understand "stop knitting" as ceasing to knit.
Persuasion: persuasion succeeds.

A garment is a kind of thing.
Status is a kind of value. The statuses are unrecognizable, beginning to take shape, halfway there, almost finished, or complete.
A garment has a status. A garment is usually unrecognizable. Definition: a garment is incomplete if it is not complete.
Before printing the name of an incomplete garment (called the item): say "[status of the clothing]".

A person can be currently-knitting. A person is seldom currently-knitting.

Every turn when a currently-knitting person carries an incomplete garment:
    repeat with the subject running through currently-knitting people:
        if the subject carries an incomplete garment (called the project):
            now the status of the project is the status after the status of the project; [effectively increment the status]
            say "[The subject] continues to work on [the project]. It is now [status of the project].";
            if the project is complete:
                now the project is wearable;
                now the subject is not currently-knitting.

Check knitting: say "You do not know how." instead. [So the player can't knit.]
Check an actor ceasing to knit: if the actor is not currently-knitting, say "[The actor] [are] not knitting to begin with." instead.
Carry out someone knitting: now the actor is currently-knitting.
Carry out someone ceasing to knit: now the actor is not currently-knitting.
Report someone knitting: say "[The actor] begins to work."
Report someone ceasing to knit: say "[The actor] stops knitting."

The Library is a room. Alice and Eliza are women in the Library. Bob, Charles, and Dave are men in the Library. Alice carries a garment called a hat. Bob carries a garment called a glove. Charles carries a garment called a scarf. Dave carries a garment called a mitten. Eliza carries a garment called a sock.

I had a similar problem with reading. The way I did it was to give a character a variable: is_reading starting at 0
When the character starts reading is_reading is set to 1.
When they stop is_reading is set to 0.

[code]Every turn:
check_whos_reading.

To check_whos_reading:
if the is_reading of Paul is 1, say “Paul is quietly reading a book.”;
if the is_reading of Greta is 1, say “Great is curled up in front of a good book.”.[/code]

Worked for me. Sorry if that’s no help.

Thanks so much for the help. I’m gonna’ try these out tonight.