Hi, I’m currently playing with darkness. I have implemented audible things and such into my game and have worked out most of the messages associated with detecting them. I’m quite happy with how it behaves.
But I wanted to customize the player’s interactions with things they could hear (but not see) in the darkness.
This code approximates what I’m dealing with:
[code]After deciding the scope of the player while in darkness:
place the clock in scope;
place the table in scope;
place the watch in scope.
Instead of taking something when in darkness:
if the noun is handled:
say “Even in this darkness, you still have a sense of where you placed [the noun], and after only a few fumbled attempts, succeed in putting your hands on it. [run paragraph on]”;
continue the action;
otherwise:
say “It’s much too dark in here to attempt to try taking [the noun]. Better to leave it until you can actually see what you’re doing.” instead.
Hallway is a dark room. Closet is north of the Hallway.
A clock is in the Hallway.
A table is a supporter in the Hallway.
The player is wearing a watch. The watch is handled.[/code]
This is how the code might perform:
[code]>get clock
It’s much too dark in here to attempt to try taking the clock. Better to leave it until you can actually see what you’re doing.
put clock on table
(first taking the clock)
It’s much too dark in here to attempt to try taking the clock. Better to leave it until you can actually see what you’re doing.
You need to be holding the clock before you can put it on top of something else.
drop watch
(first taking the watch off)
Dropped.
get watch
Even in this darkness, you still have a sense of where you placed the watch, and after only a few fumbled attempts, succeed in putting your hands on it. Taken.[/code]
Can anyone suggest a way to better handle the implicit taking? Inform 7 believes a new line is needed, and the formatting doesn’t look that great.
I’ve tried to put a [run paragraph on] after my message, but that messes up the normal taking messages. I’ve also tried to [stop the action] afterwards, but it doesn’t seem to have any visible effect on things. So, can anyone suggest something?
Also, I’d like to reduce the actions a player is allowed to do while in darkness (even when things might be in scope). So I’ve come up with this:
Instead of doing anything other than looking, examining, listening, smelling, taking, dropping or going while in darkness:
say "It's too dark for that!" instead.
And this seems to work too. Are there any special cases I’ve left out? I don’t want them to be able to do much while in complete darkness, but I figure I can write exceptions when needed to supersede this rule. BTW, I only put the “going” exception in there after I discovered that I could no longer go into another room. So… I’m guessing there might be other things that I should look out for.
Again, thanks for any help with this.