Re: Lightflag global variable (Inform)


20 Nov 1995 17:49:26 GMT

Joe Mason <joe.mason@tabb.com> wrote:
> Is the lightflag variable (set by the AdjustLight routine) safe to use
> to determine what level of light is in a room? That is, can I assume
> its always the same between calls to AdjustLight, or will some other
> routine change it?

The variable `lightflag' is initialised in the routine `PlayTheGame' and
adjusted by `AdjustLight', `ChangePlayer', and `GoSub'.

If you are keen to use documented rather than undocumented features,
then I recommend the test `if (location==thedark)' rather than
`if (lightflag==1)'.

-- 
Gareth Rees