Frictional Games Forum (read-only)

Full Version: (SOLVED) Fade IN a PointLight?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay so I'm making a map where there are lights getting lit as the player moves forward. In one area I want a pointlight to fade in. I've managed to get it to activate when the player reaches the script area but it activates immediately and it looks pretty stupid.
I also managed to get the reverse effect, fading it out using "FadeLightTo("PointLight_1", 0, 0, 0, 0, 13.5 , 1.0f);" but that's not what I want right now.

Is there any way to make a Point Light fade in?

Thanks in advance!
Try putting a torch/lamp outside of the map somewhere, and attach the pointlight to it, setting the pointlight's color to: 0, 0, 0, 1... Then script the LAMP/TORCH to "SetLampLit("LAMPNAME", false);", then have the LAMP/TORCH scripted "SetLampLit("LAMPNAME", true);" when you need the light to fade it. You should get the effect you like.
Have you tried using a timer?
Have yet to try your method Statyk, will do later though.

@Your Computer

How would that help? I want the light to fade in softly, the timing of when it activates does not matter.
(12-31-2011, 07:55 PM)Shadowfied Wrote: [ -> ]@Your Computer

How would that help? I want the light to fade in softly, the timing of when it activates does not matter.

My mistake, i was ignoring FadeLightTo's built-in timer. I should have asked, do you know what providing 0 for the RGB values for the light does?
Oh yeah, perhaps that would make it black..Let's see...

Alright now the light stays on but it still doesn't fade in, I use this..
FadeLightTo("PointLight_1", 2, 2, 2, 0, -1 , 3.0f);
(01-01-2012, 12:06 PM)Shadowfied Wrote: [ -> ]Oh yeah, perhaps that would make it black..Let's see...

Alright now the light stays on but it still doesn't fade in, I use this..
FadeLightTo("PointLight_1", 2, 2, 2, 0, -1 , 3.0f);
This doesnt make any sense...
Just put the point lights in editor with 0,0,0,0 values and then use the fadein. There cant be anything else to do. But I'm hesitant because why wouldnt you test that yourself?
(01-01-2012, 01:00 PM)Khyrpa Wrote: [ -> ]
(01-01-2012, 12:06 PM)Shadowfied Wrote: [ -> ]Oh yeah, perhaps that would make it black..Let's see...

Alright now the light stays on but it still doesn't fade in, I use this..
FadeLightTo("PointLight_1", 2, 2, 2, 0, -1 , 3.0f);
This doesnt make any sense...
Just put the point lights in editor with 0,0,0,0 values and then use the fadein. There cant be anything else to do. But I'm hesitant because why wouldnt you test that yourself?
I have a Point light in the map, I want it to fade in as the player enters a script area, I used SetLightVisible to disable it in void OnStart(). But when I enter the script area it still appears immediately but I want it to fade in so that you can see that it's going from dark to bright.

(01-01-2012, 01:04 PM)Shadowfied Wrote: [ -> ]I have a Point light in the map, I want it to fade in as the player enters a script area, I used SetLightVisible to disable it in void OnStart(). But when I enter the script area it still appears immediately but I want it to fade in so that you can see that it's going from dark to bright.
nononono....
If you dont want the player to see the the point light just set the color values to 0. There is no point using setlight visible when you can just tone the value to 0.

(01-01-2012, 01:12 PM)Khyrpa Wrote: [ -> ]
(01-01-2012, 01:04 PM)Shadowfied Wrote: [ -> ]I have a Point light in the map, I want it to fade in as the player enters a script area, I used SetLightVisible to disable it in void OnStart(). But when I enter the script area it still appears immediately but I want it to fade in so that you can see that it's going from dark to bright.
nononono....
If you dont want the player to see the the point light just set the color values to 0. There is no point using setlight visible when you can just tone the value to 0.
Thanks, it works now. I put it at 0,0,0,0 in the editor and used the same script and now it fades in smoothly.

Thanks again.