Defining new lights?
Defining new lights?
Does anyone know the object definition for creating new lights? I tried a few different things based on the Scripting Reference but it all crashes the editor when I try to place one. Thanks.
Re: Defining new lights?
Here is a light that I have gotten to work. Perhaps you can use it for reference:
If your light definition looks similar to this, but has a different baseObject, then it might be that your definition is missing some things the game needs that are otherwise defined in the baseObject of "mine_ceiling_pit_light" such as a model.
Code: Select all
defineObject{
name = "cave_light",
baseObject = "mine_ceiling_pit_light",
components = {
{
class = "Light",
enabled = true,
range = 1500,
color = vec(0.01, 0.01, 0.01),
brightness = 7,
castShadow = false,
},
},
}
Re: Defining new lights?
Perfect, thankyou I had a similar definition, but had used dummy_light as my baseobject and had an extra unnecessary class = "LightSource" in there.