Re: TADS - modifying a verb


7 Dec 1995 16:16:35 GMT

In article <4a634f$hbn@newsbf02.news.aol.com>,
DRobeson <drobeson@aol.com> wrote:
>I want "show" to work as normal with every object in the game, that is
>"show <direct object> to <indirect object>." But for one direct object, in
>one room, I want "show <direct object>" to work, without the parser
>requiring an indirect object. Or is there a way to make the parser assume
>a particular indirect object for that direct object, only in that room,

This is off the top of my head. I'm not sure it'll work as you want it
to, but at least you could try it.

Define "show" so that it works both with one and two objects, i.e. define
actions Show (with only a direct object) and ShowTo (with two objects),
define verDoShow, verDoShowTo and verIoShowTo etc.

This will have the effect of performing different actions depending
on whether you type "show gizmo to grue" or just "show gizmo".

Now, have doShow(actor) do something like

if (not Me.isIn(magicRoom)) askio;

If I remember correctly, this will cause the command
"show gizmo" to give the reply "to what do you want to show the gizmo",
*unless* you're in magicRoom.

Magnus