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 For Activating Point Lights?
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#7
RE: Script For Activating Point Lights?

(05-04-2013, 06:19 PM)FurtherGames Wrote:
(05-04-2013, 06:13 PM)Kiandra Wrote: No, you would use
SetLampLit(string& asName, bool abLit, bool abEffects);

Unless you want the lamps to appear out of nowhere. Then SetEntityActive would be appropriate (for future reference, its what you would use to spawn the enemies)

Yeah, I thought so. I have one other question. Is there a way to change the colour of a point light? When you are changing the colour in the editor you can use the sliders?

In the level editor: moving the sliders or typing in the exact value works
In script: FadeLightTo and change the afR, afG and afB values to something other than what you have in game

I used it on one of my maps to change the time of day:
if (GetGlobalVarInt("NightTriggered") == 0)
    {
        /////////////LIGHTS///////////
        FadeLightTo("PointLight_1", 0.017f, 0.060f, 0.092f, 0.010f, 2.50f, 180.0f);
        FadeLightTo("PointLight_2", 0.017f, 0.060f, 0.092f, 0.010f, 2.50f, 180.0f);
        FadeLightTo("PointLight_3", 0.053f, 0.058f, 0.071f, 0.150f, 4.50f, 180.0f);
        FadeLightTo("PointLight_4", 0.000f, 0.000f, 0.000f, 0.150f, 6.00f, 180.0f);
        FadeLightTo("PointLight_5", 0.000f, 0.000f, 0.000f, 0.150f, 6.00f, 180.0f);
        FadeLightTo("PointLight_6", 0.053f, 0.058f, 0.071f, 0.350f, 4.50f, 180.0f);
        FadeLightTo("PointLight_7", 0.053f, 0.058f, 0.071f, 0.350f, 2.50f, 180.0f);
        FadeLightTo("PointLight_8", 0.053f, 0.058f, 0.071f, 0.350f, 3.50f, 180.0f);
        FadeLightTo("PointLight_9", 0.000f, 0.000f, 0.000f, 0.350f, 6.00f, 180.0f);

And it keeps going and going all the way up to pointlight 30/spotlight 8

I would make a small room off to the side (disconnected from your map) to test the new light colours in. Just use the same static object set the rest of your map uses to ensure the colours look good.

[Image: quote_by_rueppells_fox-d9ciupp.png]
(This post was last modified: 05-04-2013, 08:00 PM by CarnivorousJelly.)
05-04-2013, 07:59 PM
Find


Messages In This Thread



Users browsing this thread: 1 Guest(s)