Posted By: dracula
Changing light level in code ? - 02/01/09 20:58
Assuming you had a wmb file (a simple level) with lights in it, is it possible to programmatically change the light level (darker or dimmer) ?
Thanks
drac.
Posted By: heinekenbottle
Re: Changing light level in code ? - 02/01/09 21:28
With dynamic lights, yes. With lights placed in WED, no.
Simply create invisible, passable, entities, with the light flag set, and the lightrange greater than 0 and RGB values greater than zero (at least in one component)
Like this:
action light()
{
set(my,INVISIBLE | PASSABLE | LIGHT);
my.lightrange = 300;
my.red = 200;
my.blue = 0;
my.green = 0;
}
creates a red light.
Posted By: dracula
Re: Changing light level in code ? - 02/02/09 10:06
Thanks
drac
Whilst this certainly works, it seems rather long winded. Do I really need to create an entity and then attatch an action etc ?
Thanks again