Frictional Games Forum (read-only)
Light's wont deactivate - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Light's wont deactivate (/thread-22022.html)



Light's wont deactivate - 7heDubz - 07-04-2013

When i place a light in the level editor and uncheck the deactivate box the light will go out. In the level editor.

However, when i go in game the point/spot/box light is still activated. I tried deactivating them by script and they perist to say "screw you im a light and im'a be on"


RE: Light's wont deactivate - PutraenusAlivius - 07-04-2013

Yea the lights won't deactivate.

Use

Spoiler below!

Code:
void SetLightVisible(string& asLightName, bool abVisible);

asLightName - Internal name (the name of the light)
abVisible - Determines the state of light (On or off, true or false respectively)





RE: Light's wont deactivate - Traggey - 07-04-2013

Wrong forum section~ Moooved.


RE: Light's wont deactivate - DeAngelo - 07-06-2013

I have this same problem in my editor, and "SetLightVisable" doesn't do anything either. However I've had some success with
Spoiler below!

FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);



Changes the properties of a light.




asLightName - internal name


afR - red value


afG - green value


afB - blue value


afA - alpha value


afRadius - radius of the light. -1 means keeping the radius


afTime - time in seconds until change is done
Just set all the colors to 0, then run the script again and set them to what you want when you want the light "on"


RE: Light's wont deactivate - 7heDubz - 07-06-2013

(07-06-2013, 03:18 AM)DeAngelo Wrote: I have this same problem in my editor, and "SetLightVisable" doesn't do anything either. However I've had some success with
Spoiler below!

FadeLightTo(string& asLightName, float afR, float afG, float afB, float afA, float afRadius, float afTime);



Changes the properties of a light.




asLightName - internal name


afR - red value


afG - green value


afB - blue value


afA - alpha value


afRadius - radius of the light. -1 means keeping the radius


afTime - time in seconds until change is done
Just set all the colors to 0, then run the script again and set them to what you want when you want the light "on"

Ahhh haha thankyou! And as for the section moving thankyou!!!