Saying text after ending the story finally?

Is there a simple standard way to say something after ending the story finally?

I’d like the player to see this:

You blah blah, congratulations!

*** You Win! ***

(Looking for a further challenge? Try xyz…)

Would you like to RESTART, RESTORE a saved game, QUIT, or UNDO the last command?

I know this is something I can hide behind a new final option like CHALLENGE or something, but if it’s easy enough, I’d like to just show that info on the ending screen.

This works for me:

The say heyo rule is listed after the print player's obituary rule in the shutdown rulebook. 

This is the say heyo rule: 
	say "Heyo!"

This prints the asterisk line, then prints ‘Heyo!’ on its own line, then asks the questions.

I found it by turning on rule names with RULES to find out the name of the asterisk thing (the player’s obituary), then googling that rule’s name to find out which rulebook it was in (the shutdown rulebook).

Edit: This might print after even unsuccessful dying.

5 Likes

Brian posted a nice solution while I was typing this, but here’s another one, which you could also use to print different things depending on whether the player died (caused by “end the story”) or won (caused by “end the story finally”):

Rule for printing the player's obituary:
	if the story has ended finally:
		say "Congratulations![paragraph break]*** You Win! ***[paragraph break](Looking for a further challenge? Try xyz…)";
	otherwise:
		say "Oh no![paragraph break]*** You Died! ***".

See also section 11.6 in the Recipe Book (Ending The Story), especially example 383 (Battle of Ridgefield).

4 Likes

Excellent, thanks! I don’t need to mess with the various ways the game can end, as there’s only one in this project. Simple is perfect.

Thanks for pointing me to 11.6 – I always forget to look in the recipe book for stuff like this!

4 Likes