Frictional Games Forum (read-only)
[REQUEST] Manipulating Fog Areas With Script? - 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)
+--- Thread: [REQUEST] Manipulating Fog Areas With Script? (/thread-30087.html)



Manipulating Fog Areas With Script? - BonesTheRabbit - 06-03-2015

So, I'm scratching my head over this. Is there any way to manipulate fog areas through script? They don't seem to function as entities. Still fiddling with things, but it doesn't seem hopeful.


RE: Manipulating Fog Areas With Script? - Neelke - 06-03-2015

The scripts existing for fog is for the one fog you can add in throughout the Level Editor. So annoyingly, no you cannot do that. Maybe there is some way, but it's not one I'm aware of.


RE: Manipulating Fog Areas With Script? - BonesTheRabbit - 06-03-2015

(06-03-2015, 07:34 AM)Neelke Wrote: The scripts existing for fog is for the one fog you can add in throughout the Level Editor. So annoyingly, no you cannot do that. Maybe there is some way, but it's not one I'm aware of.
I was considering trying to emulate the effect through billboards, but that doesn't seem to work either. Level fog isn't really good for what I'm trying to go for. I've tried every function I can think of, and I don't think I can make an entity with area fog attached.


RE: Manipulating Fog Areas With Script? - Neelke - 06-03-2015

Nope, took a look at the Model Editors resources and no fog is available. :/


RE: Manipulating Fog Areas With Script? - Darkfire - 06-03-2015

When I needed to make some decals appear (which isn't possible with script) I copied the whole area and teleported player there. Of course I added a fade out and some other tweaks (like sealing off the area) so it looked natural.
I hope this helps, although it isn't possible to make the fog fade this way.

Have you tried... ?
SetFogActive(bool abActive);
SetFogColor(float afR, float afG, float afB, float afA);
SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);

You might write a script with a timer that changes the fog very slightly and repeats. This should imitate slow appearing of the fog.


RE: Manipulating Fog Areas With Script? - BonesTheRabbit - 06-03-2015

(06-03-2015, 09:31 AM)Darkfire Wrote: When I needed to make some decals appear (which isn't possible with script) I copied the whole area and teleported player there. Of course I added a fade out and some other tweaks (like sealing off the area) so it looked natural.
Copying the area isn't really an option. Though I may circumvent the effect in another fashion.

(06-03-2015, 09:31 AM)Darkfire Wrote: Have you tried... ?
SetFogActive(bool abActive);
SetFogColor(float afR, float afG, float afB, float afA);
SetFogProperties(float afStart, float afEnd, float afFalloffExp, bool abCulling);

You might write a script with a timer that changes the fog very slightly and repeats. This should imitate slow appearing of the fog.
Yeah, area fog isn't really what I'm looking for. Tried doing a mock-up even with look-at callbacks. Might fiddle with it a bit more, though.


RE: Manipulating Fog Areas With Script? - BonesTheRabbit - 06-03-2015

Losing my head trying to think of an elegant solution here. Curse you, fog! Curse yooooou!


RE: Manipulating Fog Areas With Script? - 7heDubz - 06-03-2015

Try making a custom particle system that acts like fog?