Re: Referring to player in Inform


14 Aug 95 10:48:53 BST

In article <GDR11.95Aug13160723@stint.cl.cam.ac.uk>, gdr11@cl.cam.ac.uk (Gareth Rees) writes:
> Christopher E. Forman <ceforma@rs6000.cmp.ilstu.edu> wrote:
>> I need to know of a simple modification to the Inform library that
>> will allow players to refer to the character in the story by name
>> (i.e., saying "EXAMINE JOHN" means the same as "EXAMINE ME.")
>
> No modification of the library sources is necessary. Do something like
> this:
>
> [ PlayerParseName;
> if (NextWord() == 'john') return 1;
> return 0;
> ];
>
> [ Initialise;
> ...
> selfobj.parse_name = #r$PlayerParseName;
> ];
>
> --
> Gareth Rees

Just so. Or, if you find the above a little clumsy (though I think
it's fine), you could create an entirely new player object with
whatever names you like, and then ChangePlayer() to it in your
initialisation code.

Graham Nelson