Frictional Games Forum (read-only)
Fog areas, disable? - 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: Fog areas, disable? (/thread-15703.html)



Fog areas, disable? - Morten242 - 05-29-2012

Is there a way to effectively disable fog areas and then activate them later? Somehow got it done in one map, now in another map is won't work, can't remember if anything special was done in the first one.

Appreciate any attempt at assistance.


RE: Fog areas, disable? - Adny - 05-29-2012

(05-29-2012, 05:34 PM)Morten242 Wrote: Is there a way to effectively disable fog areas and then activate them later? Somehow got it done in one map, now in another map is won't work, can't remember if anything special was done in the first one.

Appreciate any attempt at assistance.
the only problem I could see you having is that you are using the fog area tool instead of the global fog (which is found in the level editor level settings). the script only applies to the global fog.

(this is the script in case you don't have itSmile

SetFogActive(bool abActive);



Enables\Disables the global fog.



An alternative solution would be to place the fog particle system, which you can then later destroy through scripting as well.

Hope that helped!


RE: Fog areas, disable? - Marshall2906 - 05-29-2012

If you make the Fog area 'In-active' by unticking the box. In scripting you can turn it on when you walk into an area for something such as the person stated above:
SetFogActive(bool abActive);
Enables\Disables the global fog.

If your colliding with an area to make the fog appear, then you will need more scripting...but that is all you need for that part.


RE: Fog areas, disable? - Morten242 - 05-31-2012

Thanks for the responses. However, it didn't solve my immediate problem; the fog, for some reason, refuses do be deactivated. It's "Active" box in the mapeditor is unchecked, so it shouldn't have been visible in the map, however that is not the case and it's clearly visible whether or not the box is checked.
Has anyone had any previous experience with that and any ideas how to 'fix' it?


RE: Fog areas, disable? - SilentStriker - 05-31-2012

You can't turn of FogAreas in the level editor. I haven't messed much with FogAreas so I don't know how to turn them off.


RE: Fog areas, disable? - Adny - 05-31-2012

(05-31-2012, 03:45 PM)Morten242 Wrote: Thanks for the responses. However, it didn't solve my immediate problem; the fog, for some reason, refuses do be deactivated. It's "Active" box in the map editor is unchecked, so it shouldn't have been visible in the map, however that is not the case and it's clearly visible whether or not the box is checked.
Has anyone had any previous experience with that and any ideas how to 'fix' it?
For a fix, you can try using a lot of smaller fog particle systems, then destroying them for your script. It would take significantly more time to set up, but it will get the job done.

Also, I don't think checking the "active" box for fog in the level editor has any effect in game, same idea with lights; you have to use script to disable them, trying to do it in the level editor will yield no results in game. Sadly, there is no such script for fog areas.


RE: Fog areas, disable? - Morten242 - 06-01-2012

Thanks for responses. Will most likely attempt that fog particle system then.