[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tads3] UnderSurface - Second Thoughts
- From: "Søren J. Løvborg" <kwi@xxxxx>
- Subject: Re: [Tads3] UnderSurface - Second Thoughts
- Date: Thu, 11 Sep 2003 13:22:14 -0000
- To: <tads3@xxxxxxxxxxx>
Mike wrote:
> Right - the "presence" indicates active projection of sensory information.
> This doesn't really apply to sight, because things are seen mostly by the
> ambient light they reflect, which "presence" doesn't affect.
Oh. My mistake.
> I think HiddenItem could be made to work like this:
>
> class HiddenItem: Thing
> canBeSensed(sense, trans, ambient)
> {
> if (sense != sight || discovered)
> return inherited(sense, trans, ambient);
> else
> return nil;
> }
> discovered = nil
> ;
The reason why I was thinking of a hiding container was simply
that a game might allow all (movable) items to be hidden, but in any
case, they could only be hidden in selected containers.
Anyway, this doesn't solve the problem with multiple actors.
How do you check the actor in canBeSensed, in case one actor
has discovered the object and another hasn't?
E.g., after hiding something, the player should still know where the object is,
but any NPCs shouldn't:
> HIDE ALL
(under the bed)
apple: Hidden.
Sword of Doom: Hidden.
key to the front entrance of the starship: Hidden.
first map-piece: Hidden.
> LOOK
White Room
You see a bed and a table here. Under the bed are an apple, the Sword of Doom, a key and a map-piece. On the table is the second map-piece.
The pirate enters and immediately sees the second map-piece (on the table).
"Arr, it's mine now! Could I just find the remaining piece...!" he exclaims, grabbing the map-piece.
>
I'm not saying this should be default library behaviour, but are there any hooks for implementing it?
The POV is nil in LOOK and INVENTORY commands - wouldn't it make sense to always have a valid POV when calling canBeSensed and similar?
> I'm not sure if this is always better than the isListed approach, but it
> strikes me as a bit cleaner, since it will tie in automatically with all
> forms of listing, as well as with scope.
Well, isListed doesn't remove the object from "all"-lists, does it?
We don't want anything like this, surely:
> SEARCH TRASH-CAN
After digging through rotten food and other filth, you find - a white perl!
> UNDO
Undoing one action (search trash-can).
> TAKE ALL
perl: Taken.
Søren J. Løvborg
kwi@it.dk