Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!uni-paderborn.de!golden-gate.owl.de!fu-berlin.de!news.belwue.de!scsing.switch.ch!swidir.switch.ch!in2p3.fr!oleane!simtel!lll-winken.llnl.gov!uwm.edu!vixen.cso.uiuc.edu!usenet.ucs.indiana.edu!news.cs.indiana.edu!shulick@raisin.ucs.indiana.edu
From: "Sam Hulick" <shulick@raisin.ucs.indiana.edu>
Subject: Re: Inform: Scope problem
Message-ID: <1995Oct16.144124.2030@news.cs.indiana.edu>
Organization: Vallen Software
References: <1995Oct9.010606.27946@news.cs.indiana.edu> <GDR11.95Oct13183450@stint.cl.cam.ac.uk>
Date: Mon, 16 Oct 1995 14:41:16 -0500
Lines: 29

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
