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] Turning lights red then fade
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#1
[solved] Turning lights red then fade

i there how can i make some lights (incloding lamps) to turn to red then fade?
(This post was last modified: 03-23-2011, 07:09 PM by Danny Boy.)
03-22-2011, 11:23 PM
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#2
RE: Turning lights red then fade

Do you mean Light or lamp entities?

If it's a light then you can do this:
FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime)
Example:
FadeLightTo("SpotLight_1", 1, 0, 0, 1, 5, 0.4);

To turn them back, do the same but then another number. To turn them of, do this
SetLightVisible(string& asLightName, bool abVisible);
Example:
SetLightVisible("SpotLight_1", false);

I don't know what to do with the lamps. There's a red lamp, you could do something with the SetEntityActive script and place 2 of those on eachother. But for other lamps, I really don't know

03-22-2011, 11:29 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#3
RE: Turning lights red then fade

i kinda meant both but sorry if i didn't write that very well Tongue
(03-23-2011, 01:01 AM)Danarogon Wrote: i kinda meant both but sorry if i didn't write that very well Tongue

oh c*** sorry didn't saw the lower part of the comment =/ oh well i hope i can find a way...
(This post was last modified: 03-23-2011, 01:18 AM by Danny Boy.)
03-23-2011, 01:01 AM
Website Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#4
RE: Turning lights red then fade

i think i have a problem... a poit light that was supossed tp be unactive well is geting "activated" wend i want =/ because it is already turned on.... i don't undestand...
03-23-2011, 05:15 PM
Website Find
Viperdream Offline
Member

Posts: 124
Threads: 16
Joined: Jan 2011
Reputation: 0
#5
RE: Turning lights red then fade

Putting
SetLightVisible("point_light", false);
At void OnStart() works for me

03-23-2011, 06:45 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#6
RE: Turning lights red then fade

Yea, even if you default them as unactive, I think they activate when the map loads anyway.
03-23-2011, 06:49 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#7
RE: Turning lights red then fade

oh i get Smile thanks
03-23-2011, 07:08 PM
Website Find




Users browsing this thread: 2 Guest(s)