Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
sinyx

Making mist in a map

Recommended Posts

I was wondering on how you would do it? I'm gonna have a graveyard and I want it to have mist. Any thoughts on how to do this?

Share this post


Link to post

Only way I know of how to do it is in (G)Zdoom via ACS!
example:

script 1 open
{
   sector_setfade(sectortag, r, g, b);
}
The r, g, b values can be a number from 0-255!

Share this post


Link to post

Ok but lets say this guy I know who maps, not even a guy I know its a guy one of my friends knows, has no clue about ACS or any form of scripting. How would I explain this to a person who has no idea of how to work the script? I mean cuz this guy is a total noob.

Share this post


Link to post

It's quite simple, although I only can explain it for DoomBuilder users.
Note that I assume 'this guy you know' is using Zdoom, so he would have to make sure to choose the zdoom(doom in hexen) configuration when starting the map (DB asks you about this when you make a new map or open an existing one!).
After building the graveyard area like you mentioned in the first post, he'd have to give all the sectors he would like to have the fog in the same sector tag (1 for instance).
Now he's ready to make his script;
choose "scripts-> edit BEHAVIOR lump" in the menu on top of the screen.
If there aren't any scripts already a window opens where you can click "make script"... do that!
You get a blank screen where you now can put your scripts in!
Make sure to write the following line on top of everything else:

#include "zcommon.acs"
Now the fog-script can be made like this:
#include "zcommon.acs"

script 1 open
{
  sector_setfade(1, 128, 128, 128);
}
"script 1" really explains itself I think, the "open" after that means that the script is executed once the level loads up.
The sector_setfade function in this example sets a grey (same values for red, green and blue mix to grey/white) fog in all sectors tagged with '1'
Now the only thing left to do is compiling the script, for that simply click the compile button in the upper right of the script editing window.
That's it!

For more detailed information about ACS scripting you can also look into the zdoom Wiki (Documentation) to learn a few things!

Share this post


Link to post

still nothing. I followed the code to the letter and it compiled but it wouldn't make fog. Any thoughts?

Share this post


Link to post

promise not to laugh? I had the sectors set too bright so the fog had nothing to work on. >.<

Share this post


Link to post
sinyx said:

I was wondering on how you would do it? I'm gonna have a graveyard and I want it to have mist. Any thoughts on how to do this?


This is an old effect that can be done in zdoom 1.22 and up very easily. you can change the colours of the fog with that, OR, you can manually edit the Pallete, which isn't that hard if you use The right program for it.

Share this post


Link to post

You can do this with Boom, using custom colormaps and translucent linedefs.

Share this post


Link to post

Csonicgo said:
Oh right! Boom does it too! That'd be the best choice, imo.


Except that fog-affected sectors look normal when viewed from non-fog sectors, and everything looks foggy when viewed from inside a fog-affected sector. With ZDoom you can have fog for certain sectors that looks correct wherever the player is.

Share this post


Link to post

Looks like I were beaten to the punch.

But I remember SoM exploiting something in the Boom colormap code to make something with fog. I remember that it looked very good when I tried it out in Legacy.

Share this post


Link to post

kristus said:
But I remember SoM exploiting something in the Boom colormap code to make something with fog. I remember that it looked very good when I tried it out in Legacy.


Wasn't that a custom COLORMAP that changes the default "fade" to someting more foggy? There's a utility on the FTP site called TED that can do that for you.

Also: see this thread.

Share this post


Link to post

Yes, there is. But it has one problem: The fake contrast on vertical and horizontal walls and fullbright sprites makes it look quite ugly.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×