Frictional Games Forum (read-only)
Disable AmbientLight in a specific area? - 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: Disable AmbientLight in a specific area? (/thread-7099.html)



Disable AmbientLight in a specific area? - Dalroc - 03-28-2011

I've just started working on a project and at one point I want the AmbientLight set to 0. AmbientLight is the nightvision kinda thing you get when you're in darkness.

My solution for the moment is to set AmbientLightIntensity = "0.0" in a custom game.cfg and do a full conversion, but that removes the AmbientLight for the whole game. I can work areound this by adding box lights with low intensity to simulate "nightvision".

Is there anyway to fiddle with this without making a full conversion or even better in just that specific area?


RE: Disable AmbientLight in a specific area? - palistov - 03-29-2011

Well you can add large-radius point lights with a very dark color (I used around 0.2 for each RGB field) and it will give you a low, ambient lighting feel. But it counts as a light source, so it will prevent sanity drain. Other than that I haven't much suggestions

Good luck


RE: Disable AmbientLight in a specific area? - MrBigzy - 03-29-2011

I'm not sure if it would work, but you could use global variables. I have a feeling it wouldn't though.


RE: Disable AmbientLight in a specific area? - Dalroc - 03-29-2011

(03-29-2011, 03:03 AM)MrBigzy Wrote: I'm not sure if it would work, but you could use global variables. I have a feeling it wouldn't though.
Setting AmbientLightIntensity = ambientLight in the game.cfg and then add AddGlobalVarFloat("ambientLight", 0.5); in the script for the first map gives the same result as setting the intensity to 0, no nightvision.

Is that how you meant?

@palistov
Well you can work around the sanity problem by adding a function that slowly drains your sanity when in dark areas.. But that is a lot of extra scripting :/


RE: Disable AmbientLight in a specific area? - gandalf91 - 03-29-2011

Really really dark lights still drain sanity...at least they seem to in my map. I have a box light in one area with RGB all around 0.03.


RE: Disable AmbientLight in a specific area? - MrBigzy - 03-29-2011

<Player_Darkness

MinLightLevel = "0.15"

That's the point at which you drain sanity. I'm guessing R, G, or B can't be above 0.15.
And yea, I meant you use the variable to change the ambient light, but only in the areas you want it to. Did using it work?


RE: Disable AmbientLight in a specific area? - palistov - 03-29-2011

Cool MrBigzy good tip. Smile