Re: Inform: New verb


20 Oct 1995 18:34:40 GMT

Urban Nilsson <d7urban@dtek.chalmers.se> wrote:
> I have a pen-knife and I want to extend the Open action with
> "unfold". This I can do, but I want the message to read (you unfold
> the knife) whether I use "open" or "unfold"! Anyone got any pointers
> to this?

I'm not at all sure what you mean by this. If it were me, I wouldn't
try to alias "unfold" to "open", but create a new verb:

Verb "unfold" * noun -> Unfold;

and then have objects respond to each verb appropriately:

Object Penknife "penknife"
with ...,
before [;
Open,Unfold:
if (self has general) "It's already open.";
give self general;
"You unfold the penknife.";
];

If you've aliased Unfold to Open for some reason, but just want to
change the message for "open knife", then try

Object Penknife "penknife"
with ...,
after [;
Open:
"You unfold the penknife.";
];

--
Gareth Rees