After printing the banner text

I’d like to do the thing where the banner text is not displayed until a few rooms in, and I’d also like to add a line to the banner text about typing ABOUT. Both things are mentioned in Chapter 17.35, on the “Printing the banner text” activity, but unfortunately they don’t seem to work together.

[code]First room is a room. Second room is north of first room. Heavy door is a door. Heavy Door is north of Second room. Heavy Door is closed and openable.

Third room is north of heavy door. Fourth room is north of third room. Fifth room is north of fourth room.

Rule for printing the banner text when Heavy Door is closed: do nothing.

First report going to Third room for the first time:
say “[banner text]”.

After printing the banner text:
say “For more information, type ABOUT.”[/code]

And here’s the output:

In other words, it seems to follow the “after” rules, even when it should be doing nothing. I don’t totally understand how activity rulebooks work, and I’m sure this is something simple. Is it something about the specificity of the rules? I can make it look right by changing the After rule to “After printing the banner text when the Heavy Door is open” but that seems inelegant/hacky.

I’ve seen this problem before. It’s because the printing the banner activity happens inside “[banner text]”. Try adding this to your code.

The display banner rule is not listed in the startup rulebook.

Hope this helps.

Also, you don’t need this line anymore.

Rule for printing the banner text when Heavy Door is closed: do nothing.

It is no longer needed after adding the aforementioned line of code.

You should end up with something like this.

[code]“Test”

The display banner rule is not listed in the startup rulebook.

First report going to the third room for the first time:
say “[banner text]”.

After printing the banner text:
say “For more information, type ABOUT.”.

The First Room is A Room. The Second Room is north of The First Room. The heavy door is a door. The Heavy Door is north of The Second Room. The Third Room is north of The Heavy Door. The Fourth Room is north of The Third Room. The Fifth Room is north of The Fourth Room.

Test me with “n / n / n / n”.[/code]

Hope this helps.

Excellent! I had forgotten about the existence of the startup rulebook. Thank you.

I wonder why the example code is so circuitous.

“Do nothing” doesn’t stop the activity; it just makes that for rule do nothing.

When it comes to activities, first all ‘before’ rules run; then only the most specific ‘for’ rule (in this case ‘for printing the banner text WHEN THE HEAVY DOOR IS CLOSED’ – your rule, of course, does nothing, and since it is more specific than the general ‘for printing the banner text’ in the Standard Rules, it runs instead of that less specific rule, so you have successfully prevented the ‘for’ rules from doing anything); but then, alas, all ‘after’ rules run, too.