Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 10 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Raining Weather
WHC_Grassy
General Member
Since: Apr 20, 2005
Posts: 1426
Last: Aug 25, 2007
[view latest posts]
Level 8
Category: CoDUO Mapping
Posted: Sunday, Mar. 12, 2006 07:06 am
Yeah it's a shame, but it looks like it's set at map startup.

Following on with your random selection script for cullfog, I whipped up one for expfog and it works nicely in my smaller night map I'm working on.

For others reading this, if you want to use this in your own map just place this code in a file called randomfog.gsc and put it in your maps dir.
In your map.gsc where you normaly have your fog command line use this line instead:

level thread maps\mp\randomfog::SetupExFog();

Quote:
SetupExFog() {

// This version by <|WHC|>Grassy is to setup expfog randomly,
// most of the time it will pick a moderate value
// It will also pick a random fog color within reasonable limits
// Thanks to WuphonsReach for the layout and idea.

fogclass = randomint(10);
switch(fogclass) {

case 0: // Heavy, .00060 to .00080 with 10% chance
base = .00060;
fog = ( base + randomfloat(.00020));
break;

case 1: // Light, .00020 to .00040 with 10% chance
base = .00020;
fog = ( base + randomfloat(.00020));
break;

default: // Medium, .00040 to .00060 with 80% chance
base = .00040;
fog = ( base + randomfloat(.00020));
break;
}

colmin = 0.20; //minimum fogcolor is 0.2
fogcolor = ( colmin + randomfloat(0.80)); //maximum fogcolor could be 1

setExpFog(fog, fogcolor, fogcolor, fogcolor, 0);
}


One point about adding values to random values.
I noted using randomfloat that the values didn't change until they where enclosed in brackets.
For eg; fog = base + randomfloat(.00020); dosn't work until the variable base is enclosed like so: fog = ( base + randomfloat(.00020));

You might want to check that out with your version using randomint.

Regards Grassy
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»