bmpcardoso
New Member
Dear Terasology Community,
I'm trying to create a lamp block, something that you click to turn on/off. However, not much luck so far regarding the block's self-luminance. I've tried the following approaches:
- If I just add the "luminance:15" property to the .block file, I do not seem to be able to remove it later - say, when capturing a block activate event (block.setLuminance((byte) 0) - and the block is always illuminated.
- If I add a LightComponent to my block's prefab, I have a lot of control over the block's lighting properties and I can even remove this component later, effectively "turning it off". However, but the block surfaces themselves remain unlit all the time.
- I found that the MeshComponent does have the selfLuminance property; however, even if I add the MeshComponent to my block's prefab with some "selfLuminance:15" property, the block's surfaces are always dark.
Thanks and all the best
I'm trying to create a lamp block, something that you click to turn on/off. However, not much luck so far regarding the block's self-luminance. I've tried the following approaches:
- If I just add the "luminance:15" property to the .block file, I do not seem to be able to remove it later - say, when capturing a block activate event (block.setLuminance((byte) 0) - and the block is always illuminated.
- If I add a LightComponent to my block's prefab, I have a lot of control over the block's lighting properties and I can even remove this component later, effectively "turning it off". However, but the block surfaces themselves remain unlit all the time.
- I found that the MeshComponent does have the selfLuminance property; however, even if I add the MeshComponent to my block's prefab with some "selfLuminance:15" property, the block's surfaces are always dark.
Thanks and all the best