Conditional Triggers...

All,

The player begins the story at a crime scene. There are a number of objects and persons for him to interact with and examine i.e. a body, a medical examiner, etc. The goal is that after the player has explored the scene sufficiently, they receive a phone call from one of their informants with information relevant to the case. I have been back and forth through the “actions as conditions” section of the book and I think it should be relatively simple. But I can’t get the interpreter to recognize the past tense of verbs it seems to have no issues recognizing in the present tense. Here is a sample input (one of many I have wrangled with)

After examining the body:
If the crumpled napkin has been examined, say “Your phone rings. Not your personal cell, but your other phone, the prepaid one you replace regularly.”

And here is the error message I receive:

Each time Go or Replay is clicked, Inform tries to translate the source text into a working story, and updates this report.)

Problem. In the sentence ‘If the crumpled napkin has been examined’ , I was expecting to read a condition, but instead found some text that I couldn’t understand - ‘crumpled napkin has been examined’.
I was trying to match this phrase:

if (crumpled napkin has been examined - a condition):
But I didn’t recognise ‘crumpled napkin has been examined’.

I’ve been back and forth with various formulations “if the player has done X”, etc, and nothing seems to work. Am I going crazy?

Past tense doesn’t work that way in Inform 7, but you can make it work that way.

One way is this definition:

A thing can be examined or unexamined. A thing is usually unexamined. After examining something: now the noun is examined; continue the action.

Then you can say:

if the crumpled napkin is examined, say “anything you want.”

(craiglocke gave a perfectly good answer, but in the interests of helping you conquer §9.12…)

No, but Inform can be very fussy about syntax despite its natural language style.

§9.12. Actions as conditions gives the required phrasing as “when we have”. So:

Crime Scene is a room.

The body is a thing in the Crime Scene. The description is "What a mess."
The crumpled napkin is a thing in the Crime Scene. The description is "The napkin is stained with blood."

After examining the body when we have examined the crumpled napkin:
	say "Your phone rings. Not your personal cell, but your other phone, the prepaid one you replace regularly."

Test me with "x body / x napkin / x body / z / x body".

If you test this example, you’ll find that the phone rings each time that player examines the body after having examined the napkin, but only during those turns when the player examines the body.

I’d suggest having the after rule set a ‘ringing’ property on the phone and writing separate rules to deal with the incoming phone call.

Crime Scene is a room.

The body is a fixed in place thing in the Crime Scene. The description is "What a mess."
The crumpled napkin is a thing in the Crime Scene. The description is "The napkin is stained with blood."

The player carries a phone. The phone can be ringing. The phone is not ringing.

After examining the body when we have examined the crumpled napkin for the first time:
	now the phone is ringing.
	
Every turn when the phone is ringing and the phone was not ringing:
	say "Your phone rings. Not your personal cell, but your other phone, the prepaid one you replace regularly."
	
Every turn when the phone is ringing and the phone was ringing:
	say "Your phone continues to ring."

Answering is an action applying to one thing.
Understand "answer [something]" as answering.

Check answering (this is the non-standard block answering rule):
	instead say "[We] [can't] answer [regarding the noun][those]." (A).
	
Instead of answering the ringing phone:
	now the phone is not ringing;
	say "You answer the phone. It's Joey Knuckles. 'Meet me under the bridge in ten minutes,' he tells you and hangs up."
	
Instead of answering the phone:
	say "The phone's not ringing. You should get yourself checked out for tinnitus."

Test me with "answer phone / x body / x napkin / x body / x body / answer napkin / answer phone / x body".