Trouble with light source

psymann
18 May 2013, 23:56
I can only assume I'm making some silly mistake here as it seems so obvious this ought to work :-S


I have a torch, in my inventory. It is set to be a weak lightsource to start with.

I have some batteries. When I put the batteries in the torch, I run a script that includes:

SetObjectLightstrength (torch, "strong")

And I'm pretty sure it runs that, because it does also print the message that is right next to it in the code.



I then walk in the cellar, where it is Dark.

But I get the "Dark" description, not the light one. And to confirm the darkness of it, I can't examine any objects that are in the cellar but not set to be weak lightsources.

It would seem my torch doesn't work. I even took out the batteries and gave the ends a rub to make sure they worked ;-) (and checked the debugger and checked that its attribute was set to Strong, which it was.)

Is there some noob mistake I've made to explain why my torch doesn't work?

psy

Sora574
19 May 2013, 01:00
Strongly lit objects will only light the parent of that object.
For example, if you are holding the torch while it is lit, you are lit. The room, however, is not lit, as it isn't the direct parent.
If you drop the torch while it is lit, the room will become lit.

I'm not sure if this is a bug or if this is intended, though.

psymann
19 May 2013, 11:09
Oh, goodness :shock:

So it sounds as if making the torch a lightsource is completely pointless, since I'm not going to go around dropping it in rooms in order to see better.

I suppose instead I have to make the player a lightsource. I know some people who think that light shines out of ... but even so, that really does seem rather odd. If it's not a bug, then it's very curious design.

Thanks for the help, without which I could have been days without working that out.

psy

Pertex
19 May 2013, 15:33
Sora574 wrote:I'm not sure if this is a bug or if this is intended, though.


It's a design bug :D I will change this for the next version