After Rule blocks Room Header

#1

Hi im new here and i hope this is the right place to post. I’m using Inform7 and stumbled over a problem:

Upper Corridor is a room. “The short corridor between your room, your sisters room and the upper bathroom is silent and devoid of any clutter.”
Upper Corridor is up of Lower Corridor.
After going to Upper Corridor:
if Ashlyn1isinshower is true:
play the Sound of Shower;
say “blah blah”;
otherwise:
say “[description of Upper Corridor].”;

i wrote that part so that when the player enters the room the sound starts… which works but i do not get the room title (the bold line?) whether or not the Ashlyn1isinshower is true. Somehow the “after going” line blocks the title from showing up but i need that line to trigger the sound =/.

It’s nothing mayor but im a bit ocd about having each room title show up so the player/reader knows where he or she is.

Thanks in advance for any help.
Gerugon

0 Likes

(matt w) #2

Welcome to the forum Gerugon!

“After” rules by default stop the action processing there, so they don’t move on to the “report” stage. The rule that prints the bold room name and description is a Report rule (the “describe room gone into” rule), so that’s what’s happening.

If you want the Report rules to run after your After rule, the solution is just to put “continue the action” in your rule. That way you don’t even have to worry about printing the description of Upper Corridor in your rule–you can just let the Report rule handle it.

In fact you can make sure that the rule only runs when Ashlyn is in the shower:

After going when ashlyn1isinshower is true:
	play the Sound of Shower;
	say “blah blah”;
	continue the action.

(By the way, to get the indentation for the code like that, you can paste your code in, highlight it, and click the button that looks like </> above where you type the post.)

1 Like

#3

Thanks alot for the quick answer =D

0 Likes