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

Members Online

»
0 Active | 51 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

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: CoD Mapping
CoD 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: Adding snow to you map
GOA-NITRO
General Member
Since: Apr 15, 2006
Posts: 18
Last: Jul 28, 2011
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Tuesday, Aug. 19, 2008 07:45 pm
Rasta writes...
Quote:
So you do have a .gsc called snow_effects right?


Yes m8 everything is in there:

main()
{
level.snoweffect = loadfx("fx/weather/snowfallfor5seconds.efx");
snowmitters = getentarray("snow","targetname");
delay = 5;
initialoffset = 0;
for(i=0;i {
snow thread snowblow(delay,initialoffset);
if(initialoffset < 5)
{
initialoffset += .2;
}
else
initialoffset = 0;

}
}

snowblow(delay,initialoffset)
{
wait initialoffset;
while(1)
{
playfx (level.snoweffect,self.origin);
wait delay;
}

}


and

main()
{


maps\mp\_load::main();

maps\mp\snow_effects::main();


game["allies"] = "american";
game["axis"] = "german";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "winter";
game["german_soldiertype"] = "waffen";
game["german_soldiervariation"] = "winter";

game["attackers"] = "allies";
game["defenders"] = "axis";



}


and the FX you submitted


Thanks again

Jay
Share |
silly_boy
General Member
Since: Apr 12, 2008
Posts: 24
Last: Oct 1, 2008
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Saturday, Aug. 23, 2008 10:17 am
Hey Rasta i added the script_origins to my map and did the necessary scripting and when i tested the map it crashed while it was loading[confused]
Share |
GOA-NITRO
General Member
Since: Apr 15, 2006
Posts: 18
Last: Jul 28, 2011
[view latest posts]
Level 1
Category: CoD Mapping
Posted: Tuesday, Aug. 26, 2008 08:00 pm
Hi again....dunno if this is the problem....i had a look in my PK.5 in my main and couldnt find Weather in the FX and no EFX for snow...any help please...thanks guys

Regards
Share |
Mystic
General Member
Since: Apr 10, 2004
Posts: 6147
Last: Apr 15, 2018
[view latest posts]
Level 10
Forum Moderator
Im a fan of MODSonair
Category: CoD Mapping
Posted: Tuesday, Aug. 26, 2008 10:23 pm
To be honest guys this is such an old thread from years ago, since which i have redone the script to make it much more suitable for all maps. Try this following:
To prevent lagg and the game draw efx over the whole map, we are going to 'spawn' the rain or snow in front of the actual player.

First you need to create a new .gsc file, and then your need the following script, so just copy and paste it into the new .gsc:

Code:
main()

{
     level thread rasta_rain();
}


rasta_rain() 
{    
zufall = RandomInt(100);        
while(1) 
{
players = getentarray("player", "classname");        
if(players.size > 0) 
{
max_nodes         = 20;
max_nodes_per_player     = max_nodes/players.size;
for(ii=0;ii<max_nodes_per_player;ii++) 
{ 
for(i = 0; i < players.size; i++) 
{
player = players[i];
if(isAlive(player)) 
{
x= 350-randomfloat(700);
y= 350-randomfloat(700);                    
pos = player.origin +(x,y,200) ;                        
trace = bulletTrace(pos,pos +(0,0,-250), true, undefined);
if(trace["fraction"] != 1) playfx(level.rasta_rain,trace["position"]);                

wait 0.05;

}                        
}
}                    
}

wait 0.05;
}    
}


Now lets save this as rain.gsc

2) Next step is to load the rain or snow effects, so somewhere in 'yourmap.gsc' add the following line:

Code:
level.rasta_rain   = loadfx("name of effects");


You will also need to add another line to 'yourmap.gsc'

Code:
      maps\mp\rain::main();
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»