Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(SOLVED) Fade IN a PointLight?
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#1
(SOLVED) Fade IN a PointLight?

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!
(This post was last modified: 01-01-2012, 09:05 PM by Shadowfied.)
12-31-2011, 11:55 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: Fade IN a PointLight?

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.
12-31-2011, 03:28 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: Fade IN a PointLight?

Have you tried using a timer?

Tutorials: From Noob to Pro
12-31-2011, 07:50 PM
Website Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#4
RE: Fade IN a PointLight?

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
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#5
RE: Fade IN a PointLight?

(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?

Tutorials: From Noob to Pro
12-31-2011, 08:32 PM
Website Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#6
RE: Fade IN a PointLight?

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 post was last modified: 01-01-2012, 12:14 PM by Shadowfied.)
01-01-2012, 12:06 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#7
RE: Fade IN a PointLight?

(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
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#8
RE: Fade IN a PointLight?

(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
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#9
RE: Fade IN a PointLight?

(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
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#10
RE: Fade IN a PointLight?

(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.

01-01-2012, 09:04 PM
Find




Users browsing this thread: 1 Guest(s)