Re: Inform: Scope problem


13 Oct 1995 17:34:50 GMT

"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. You can
examine the variable `action_to_be' (I think) so you can selectively
choose which verbs should pick objects immediately carried by the player
(e.g. `eat') and which shouldn't (e.g. `take').

--
Gareth Rees