Leurnid,
Thats an issue with most placeable light sources. When I can I avoid using those. If you can, it is best to use the non-light emitting placeables and to apply a light vfx via script as a permanent visual effect. Unfortunately not all placeables can emit light in this way. The kind that look like VFXs - such as Project Q's flames - do not seem to take a light effect like this. Perhaps they lack the right kind of mesh. I dunno. And they make this all more complicated. Thankfully they are rare.
So anyway, my recommendation for you in most cases is to apply a light VFX via script rather than adjust tile lighting. You'll get a much better looking result. I do this with dynamically spawned campfires (which also have a dynamic looping sound effect that I am proud of
'> ), player placeable candles and lanterns, and non-dynamic placeables (those placed by me in the toolset) are placed in the "off" state, and have a Use event which can switch them on during which the light effect is applied or off which clears all light effects.
For the later it is possible to have the placeable automatically switch itself on as well rather than rely on a player. But that would require you to set up a framework that responds to placeable spawn or area enter or the like. Since placeables do not "spawn" that can be a little tricky, but there are many ways to solve it. You could also create two kinds of placeable prefabs - one that is placed on, the other that is placed off.
FP,
Thanks for that! It looks like we came up with different methods to solve the same thing. it would be useful to compare notes I think.
I am using the placeable's OnUse event of a torch/lantern placeable to turn it on or off. For other options rather than using a conversation, I've hooked into the AID framework and can add commands to each object: examine (provides more info and a list of other commands), light/extinguish, take, push/pull (secret doors need toggles!) etc.... I haven't come up with any other yet.
So far I have two kinds of placeables that operate this way. The main kind works as above. The other kind is a player item that when dropped on the ground becomes a placeable (lanterns and candles) which emits light. These item/placeables are taken when "used" just as a typical item would be. And they are consumable just as their item equivalents are. I have not yet them the ability to turn on or off, because the candle placeable that I am using doesn't have an off state. Until I have a candle placeable with two states and also has an identical holdable model, I think I'm just gonna stick with what I have. This means that gusts of wind simply destroy placed candles rather than blowing them out.
Disclosure: yes, I became obsessed with lighting, and light emitting items, and perception of light by creatures last year and so hopefully this is the last "light" feature that I will roll into Arnheim.