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
Script Help Lighting Complications [RESOLVED]
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#1
Lighting Complications [RESOLVED]

void OnStart()
{    
    SetEntityConnectionStateChangeCallback("ArchiveLamp_01", "Light_01");
}

void Light_02(string &in asEntity, int alState){ FadeLightTo("ArchiveLight_01", 1, 0, 0, 1, 4.0, 1.0); }

So, this code doesn't seem to want to work. In essence, I just want a point light to activate when I light a lamp entity. I can't use a connection, because the light is a different color than the lamp. Halp?
(This post was last modified: 04-24-2013, 03:25 PM by BonesTheRabbit.)
04-24-2013, 05:08 AM
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#2
RE: Lighting Complications

Is there a script that will check if Light A is on and then use a condition that is light A is on then activate pointlight B?

04-24-2013, 05:11 AM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#3
RE: Lighting Complications

(04-24-2013, 05:11 AM)WIWWM Wrote: Is there a script that will check if Light A is on and then use a condition that is light A is on then activate pointlight B?

I have absolutely no idea. I've looked through, and there doesn't seem to be much regarding lamps outside of a function to turn them on or off. Handy if you want a gust of wind to blow them out, but... Well, that's all I can find. Lighting a lamp doesn't seem to count as interacting with it, either. Needless to say, I'm stumped.
(This post was last modified: 04-24-2013, 05:19 AM by BonesTheRabbit.)
04-24-2013, 05:18 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Lighting Complications

Use connected lights.

Click the spot light and make all the color values 0.

Then click the lamp and go to the entity tab.
Paste the name of the light in the tab called something like "Connected light".
Adjust the lighting color from 1 to 0.5
Set the lamp unlit.

Trying is the first step to success.
04-24-2013, 05:35 AM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#5
RE: Lighting Complications

(04-24-2013, 05:35 AM)BeeKayK Wrote: Use connected lights.

Click the spot light and make all the color values 0.

Then click the lamp and go to the entity tab.
Paste the name of the light in the tab called something like "Connected light".
Adjust the lighting color from 1 to 0.5
Set the lamp unlit.

I thought this made the light the same color as the lamp.
(This post was last modified: 04-24-2013, 06:37 AM by BonesTheRabbit.)
04-24-2013, 06:37 AM
Find
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#6
RE: Lighting Complications

You could always make a custom entity version of the lamp where the light is the color you want your pointlight to be. Then connect them. Would probably look better too to have the ambient pointlight that comes with the lamp be the same color as your pointlight.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
04-24-2013, 07:04 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Lighting Complications

It does make the light the same color as the lamp. I'm guessing you just wanted a brighter area of the lamp.
If not, use SetEntityCallbackFunc.

Inside the function put:

if(asType == abLit)
{
Fade the light
}

Trying is the first step to success.
04-24-2013, 07:08 AM
Find




Users browsing this thread: 1 Guest(s)