

![]() |
| Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above. |
|
This is a very short and simple tutorial for adding rain effects to a CoDUOMP map. This tutorial require no modifying to the .map at all.
To prevent lagg and the game draw efx over the whole map, we are going to 'spawn' the rain 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: main() {level thread teh_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.the_rain,trace["position"]); wait 0.05; } } } } wait 0.05; } } Now lets save this as rain.gsc 2) Next step is to load the rain effects, so somewhere in 'yourmap.gsc' add the following line: level.the_rain You will also need to add another line to 'yourmap.gsc' maps\mp\rain::main();So yourmap.gsc should look something like this: main() {setCullFog (0, 16050, .54, .56, .50, 0); setExpFog (0.00015, .36, .39, .42, 0 ); ambientPlay("some tunes");
level thread maps\mp\_jeepdrive_gmi::main(); level thread maps\mp\_flak_gmi::main();
maps\mp\rain::main(); //calls rain efx
game["axis"] = "german";
game["russian_soldiervariation"] = "normal"; game["german_soldiertype"] = "wehrmacht"; game["german_soldiervariation"] = "normal";
game["defenders"] = "axis"; And you all done. So simple ah? Rasta |
Latest MODSonline Poll
MODSonline Teamspeak
Partners of MODSonline
Friends of MODSonline
|