[I6] Understanding Brief Mode

There’s a better way to do your before routine. For the Inform 6 standard library, use:

before [;
    Exit:
        <<Go s_obj>>;
],

For PunyInform:

before [;
    Exit:
        <<Go FAKE_S_OBJ>>;
],

In this way, your movement code is localised so that you don’t have to write the same code in two places. I use this a lot.

Oh, there’s a better way with all my code :confused:

I’m doing stuff like:

before [;
    GoIn:
         <<Enter bridgeHatch>>;
],

Not sure how horrible this is, but it works. Quick and dirty. So I’ve done it for a while. That’s the reason BRIEF was broken.

Thanks for looking :slight_smile:

This is from DM4 p.63.

Object Octagonal_Room "Octagonal Room"
with ...
ne_to "The way north-east is barred by an invisible wall!",
w_to Courtyard,
e_to [;
if (Amulet has worn) {
print "A section of the eastern wall suddenly parts
before you, allowing you into...^";
return HiddenShrine;
}
],
s_to [;
if (random(5) ~= 1) return Gateway;
print "The floor unexpectedly gives way, dropping you
through an open hole in the plaster...^";
return random(Maze1, Maze2, Maze3, Maze4);
];

Which is how fredrik showed you.

Edit:
So, how about

if (frob notin self) return secondRoom;
"The way is blocked!"

That way, you don’t need Before rule, right?