Hi there,
here’s a quick example of what I tried to do (and failed):
"In the Dark" by HtF
Starting room is a room. [doh]
Test room is a dark room. "[if the test room is dark]A faint light glows from the wall, indicating the presence of a switch."
The iffy door is a door. It is north of starting room and south of test room.
Understand "door" as the iffy door.
The light switch is a thing in the test room. The light switch can be on or off. The light switch is off.
Instead of pushing the light switch:
if the light switch is off:
now the light switch is on;
now test room is lit;
otherwise:
now the light switch is off;
now test room is dark; [ I know this would be problematic, this is just for the test]
Definition: The Test room is dark if the iffy door is closed and the light switch is off.
Definition: The Test room is lit if the iffy door is open or the light switch is on.
[That is the, ahem, first amendment I made after I realised I could not do ANYTHING since it was dark]
after deciding the scope of the player:
if the location of the player is the test room:
place the iffy door in scope;
place the light switch in scope;
[That is the, ahem, second amendment I made after I realised I could not do ANYTHING since it was dark]
visibility rule when doing anything in the test room:
if the iffy door is closed and the light switch is off:
Say "It *should* be lit, actually!";
there is insufficient light;
otherwise:
Say "It *should be dark*!";
there is sufficient light;
[That is the, third amendment I made after I realised I could not do ANYTHING since it was dark]
rule for writing a paragraph about the light switch:
if the test room is dark, say "A faint light glows from the wall.";
No matter what - the only way I could toggle the room between lit and dark was by using the switch. My definitions don’t fire, my visibility rule is completely ignored and all things in the dark rooms are ignored as well. All examples I found were completely useless because they handled different things and usually required a “lit” item and did not have visibility based on an open door or something.
I tried to tackle the problem of the room being dark despite the open door by seeing what rules were used …
>n
[Rule "after deciding the scope of the player" applies.]
[Rule "standard set going variables rule" applies.]
[Rule "can't travel in what's not a vehicle rule" applies.]
[Rule "can't go through undescribed doors rule" applies.]
[Rule "can't go through closed doors rule" applies.]
(first opening the iffy door)
[Rule "can't open unless openable rule" applies.]
[Rule "can't open what's locked rule" applies.]
[Rule "can't open what's already open rule" applies.]
[Rule "standard opening rule" applies.]
[Rule "determine map connection rule" applies.]
[Rule "can't go that way rule" applies.]
[Rule "move player and vehicle rule" applies.]
[Rule "move floating objects rule" applies.]
[Rule "check light in new location rule" applies.]
[Rule "describe room gone into rule" applies.]
[Rule "determine visibility ceiling rule" applies.]
[Rule "room description heading rule" applies.]
Darkness
Now, I suspect that “check light in the new location rule” could handle the problem with the open door and the light switch and I guess the other rules might be helpful to have the dim glowing light switch appear (bacause of a pilot light in it) but I have NO CLUE how to see what these rules actually DO, see their code, their return code or anything. I even tried to write a new one but they never got triggered.
Since even google offerend 0 hits when using Inform “check light in the new location” this forum is my final hope that someone can tell me how to actually SEE and understand what all these rules that are mentioned when you activate rule tracing DO.