I just finished my first IF game, and I’m pretty excited about Inform7. I’m a programmer by trade, and hacking Inform7 reminds me strongly of my Prolog days … There is still a feeling I’m doing things in a cumbersome way, though. Maybe someone can help.
I implemented a “sentinel” in one of my games, who blocked the path into a certain direction if the “utteredness” of some codeword was yet “untold” (I know this sounds extremely cumbersome right from the start …):
codeword is a kind of thing. utteredness is a kind of value. the utterednesses are told, untold. a codeword has an utteredness. The utteredness of a codeword is usually untold. ic0510 is a codeword. Room1 is a room. Room2 is a room. Room2 is west of Room1. Instead of going west from Room1: if ic0510 is told: move the player to Room2; otherwise: say "You have to say the code first.". Saying is an action applying to one visible thing. Understand "say [any thing]" as saying. Carry out saying: if the noun is ic0510: if the location of the player is Room1: say "The way is clear!"; now the utteredness of ic0510 is told;
This works as expected. BUT: I want to extend this to arbitrary alphanumerical codewords, especially pure numbers. But then I’d have to make the action “saying” applicable to numbers, too, which I didn’t manage yet. Any hints?