Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!Germany.EU.net!howland.reston.ans.net!news.sprintlink.net!news.oz.net!news.lei.net!news.pixi.com!eskimo!roc
From: roc@eskimo.com (Mark Riel)
Subject: Re: Inform lighting tricks?
X-Nntp-Posting-Host: eskimo.com
Message-ID: <D9uo5M.2A9@eskimo.com>
Sender: usenet@eskimo.com (News User Id)
Organization: Eskimo North (206) For-Ever
References: <60.5657.4154.0N1E56B6@canrem.com>
Date: Thu, 8 Jun 1995 10:36:37 GMT
Lines: 28

In article <60.5657.4154.0N1E56B6@canrem.com>,
Tim Middleton <tim.middleton@canrem.com> wrote:
>What is and good way in Inform to create a light source that illuminates
>several rooms at once? (ie. One switch controls lights for many rooms).
>
>I've tried various methods. My latest was simply creating a lamp object with
>no description and giving it Found_in property for all the rooms it lights.
>Even this won't work for me for some reason... however it's not idea anyhow,
>as I'd like the physical lamp only accessable in one room, yet it lights
>several.
>
>I guess I could do some more elaborite programming of this lamp to literally
>grant "light" attribute to each room when it's turned on and take it away if
>it's turned off. This gets tricky because I want to have several lights and
>they overlap certain areas they illuminate. So if just one of the lamps is
>on then certain same areas will be lighted.
>
>It seems there is probably an easier way to solve this connundrum... at
>least I am hoping there is! Can anyone give me any ideas or point me to some
>existing examples?
>
	You could give the rooms a 'number' property. Each time you hit a 
switch you add one to all effected rooms light 'number'. Then give any room 
with > 0 'number' give it light. Turning switches off subtract one from the 
light 'number'. Take a bit of coding, but only once with mupltiple light 
sources. I'd probably just make a new property, lightlevel.
-MRR

