Usenet.com

www.Usenet.com

Group Index

Rec Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: [T2] darkroom: making certain things visible



David,

"David" <[EMAIL PROTECTED]> wrote in message
news:3fce6b90$0$23819>  > For instance, borrow the "islit" definition from
darkroom and the
> "noexit".
>
> I'm unsure about how the islit property releates to darkroom.  What I
> gathered from the manual is that *islit* refers to a lightsource and the
> light in the darkroom itself is governed by *lightsOn*.  So:

islit is also a method in darkroom which determines whether you can see.
It takes lightsOn into account, as well as whether there is a light source
present.  An object's islit is simply "true" or "nil."

>
> while(lightsource.islit){
>    darkroom.lighsOn = true;
> }
>
> /* Putting aside the inaccuracy of the code (I just did it off the top
> of my head) I think the algorithm is right.  On the other hand, is the
> following true? */
>
> while (lightsource.islit){
>    darkroom.islit = true;
> }

You should be aware that "while" doesn't indicate something that is true
or false.  What the code just above does is repeatedly set islit to "true"
if islit is "true," and will actually go on forever.

> In other words, is *islit* a property of darkroom or does it just affect
> the *lightsOn* property of darkroom instead.

it's like this:
lightsource: "islit" property is either true or nil, most likely.
darkroom: "lightsOn" is nil but can be set to true if you NO LONGER
EVER need light to see there (this doesn't seem to be what you want).
darkroom.islit should never be set to anything.  It's a piece of code.

I believe what Quintin Stone is suggesting is that you make your room
actually a ROOM, but copy some code (modified suitably) from the
darkroom class.

If you open adv.t and search for "class darkroom: room", you'll see
everything darkroom does that you do and don't want.

> Thanks for your help.

No problem.  Tell us how it goes.

Kevin Venzke





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.