Re: Inform: Scope problem
Mon, 16 Oct 1995 14:41:16 -0500
gdr11@cl.cam.ac.uk (Gareth Rees) writes:
>"Sam Hulick" <shulick@mango.ucs.indiana.edu> wrote:
>> I'm having a problem with scope... here is a situation:
>>
>> You are carrying:
>> an apple
>> a steel box
>> six apples
>>
>> If you do "eat apple" or "examine apple", it will choose to refer to
>> one in the box. WHY? How can I make Inform refer to the one that is
>> in the player's hand rather than one that is in the box?
>
>There's some kind of object-scoring going on in the parser so that
>objects held by the player score lower than other objects. The point of
>this is that "get apple" shouldn't try to take an apple you're already
>holding if there's another apple available. If this behaviour annoys
>you, use the `ChooseObjects' entry point to adjust the scoring.
The manual SAYS that ChooseObjects is called when trying to
pick an item that may be ambiguous.. but it does not get called. I
inserted a print statement into my ChooseObjects, and did "get apple"
and apparently the ChooseObjects routine wasn't called.
--
--- Sam Hulick ------------- shulick@indiana.edu ---------------------
Systems Consultant | Homepage:
Indiana College Placement | http://copper.ucs.indiana.edu/~shulick/
and Assessment Center | PGP public key available on request