
www.Usenet.com
| <-- __Chronological__ --> | <-- __Thread__ --> |
I had a more specific thought or two. Here's what you could do to
have a standard pitch black room which allows you to see and take the
object "torch":
startroom: darkroom
(insert sdesc, ldesc, directions...)
lookAround(verbosity) =
{
inherited.lookAround(verbosity);
//do what a darkroom would normally do, but then:
if(not self.islit and torch.location=self)
"\nYou detect your torch's distinct odor nearby."
//i.e. we want a torch-specific message if we're dark and it's here.
}
roomCheck(v) =
{
if(v=takeVerb) return true;
pass roomCheck;
//don't stop "take" at this point. everything else as normal.
//not sure you can "pass" here. also try: return inherited.roomCheck(v);
}
roomAction(actor, v, dobj, prep, io) =
{
if(v=takeVerb and dobj=torch) return;
//don't do anything if it's "take torch"
pass roomAction;
//do normal stuff.
}
;
so the idea is that you'd get a description like:
It's pitch black.
You detect your torch's distinct odor nearby.
Kevin Venzke
| <-- __Chronological__ --> | <-- __Thread__ --> |