[I7] Deadly directions

I’m slowly working on converting an old Inform 6 game to Inform 7 (only 298 problems to go!)

Can someone please tell me how to create a direction that leads to death? In Inform 6 it used to look something like:

w_to [; DeadFlag=1; "You fall off a cliff!";],
I’m not clear on how to do this in I7. I looked up ‘death’ and ‘directions’ in the Index but couldn’t find what I wanted.

“end the story” is the phrase that does that.

Thank you, I know that but I’m not sure how to express it within a direction, including text that explains why you have died.


Instead of going west from Ridge, say "You fall off the cliff!"; end the game.

doesn’t seem to work.

You can attach a sub-phrase ‘end the story saying “Final commiserations”’. You can use a say phrase before to provide an explanation. See §9.4. When play ends in the I7 documentation for details.

Instead of attacking the glass presentation case: say "The glass pane of the presentation case shatters, throwing fine glass everywhere, including over the delicate museum-piece inside. Nor does the noise pass unnoted: only a second passes before there are footsteps in the hall, and though you make for the concealing darkness and escape of the turret, you are not swift enough. The servants are soon on you, and you are made to regret, quite painfully, this casual act of vandalism."; end the story saying "You have lost your opportunity."

Your code doesn’t work because the punctuation is off: a comma can be used only when the rule consists of exactly one phrase. You have two so you have to use a colon:

Instead of going west from Ridge:
	say "You fall off the cliff!"; 
	end the story.

And, as zarf said, it’s “end the story”, not “end the game”.

Fantastic, that’s exactly what I needed to know.

Thanks gents.