Frictional Games Forum (read-only)
[solved] Turning lights red then fade - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: [solved] Turning lights red then fade (/thread-7005.html)



[solved] Turning lights red then fade - Danny Boy - 03-22-2011

i there how can i make some lights (incloding lamps) to turn to red then fade?


RE: Turning lights red then fade - Viperdream - 03-22-2011

Do you mean Light or lamp entities?

If it's a light then you can do this:
Code:
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
Code:
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


RE: Turning lights red then fade - Danny Boy - 03-23-2011

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


RE: Turning lights red then fade - Danny Boy - 03-23-2011

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


RE: Turning lights red then fade - Viperdream - 03-23-2011

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


RE: Turning lights red then fade - MrBigzy - 03-23-2011

Yea, even if you default them as unactive, I think they activate when the map loads anyway.


RE: Turning lights red then fade - Danny Boy - 03-23-2011

oh i get Smile thanks