Frictional Games Forum (read-only)

Full Version: Manipulating Fog Areas With Script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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.
(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.
Nope, took a look at the Model Editors resources and no fog is available. :/
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.
(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.
Losing my head trying to think of an elegant solution here. Curse you, fog! Curse yooooou!
Try making a custom particle system that acts like fog?