Hi!
Please help me with this problem.
I want to change the ambient light (fade in), when my character enters a region. This works fine, when I change the light from black to white, but it doesn´t with colored lights.
on "ActorEntry"
{
for (var a=0;a<255; a = a+10)
{
Scene.AmbientLightColor = MakeRGBA(a,a,a);
Sleep(1);
}
}
on "ActorLeave"
{
for (var a=255;a>0; a = a-10)
{
Scene.AmbientLightColor = MakeRGBA(a,a,a);
Sleep(1);
}
}
I´ve gathered that I have to convert the RBG to HSL and back again using the new functions in the beta-version and change the L-value in a loop, but I really don´t know how to do this.
An example would be great!
Many greetings,
Oli