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

Members Online

»
0 Active | 9 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 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: rain goes into houses (mp)
newbie11
General Member
Since: Jan 23, 2007
Posts: 59
Last: Aug 3, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Sep. 28, 2007 10:57 am
hi
I added rain to my mp map but there is a problem - the rain goes everywhere in my map even in houses and other places such as tunnels etc. How can i fix that?
Share |
{GITS}Cleaner
General Member
Since: May 23, 2006
Posts: 778
Last: Apr 23, 2011
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Sep. 28, 2007 02:10 pm
Try this.

The_Caretaker:
Quote:
Raise the position where the rain effect starts. So it rains outside.. and on the roof instead.

pos = player.origin +(x,y,200) ;

if you raise the 200 number, the effect will spawn higher.
Share |
newbie11
General Member
Since: Jan 23, 2007
Posts: 59
Last: Aug 3, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Sep. 28, 2007 06:03 pm
I tried this but it works very strange.
I made (x,y,2000); (finish point x,y,-2050) and there wasnt any change. Then I changed the finish point to -2005 and rain appeared only in some rooms [eek] e.g. no rain in the house but rain in the garage next to the house which roof is lower than the house roof.
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: CoD2 Scripting
Posted: Monday, Oct. 1, 2007 05:30 pm
You need to spawn the efx above the highest point on the z axis, so thats more than likely the roof of your tallest building
Share |
newbie11
General Member
Since: Jan 23, 2007
Posts: 59
Last: Aug 3, 2009
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Tuesday, Oct. 2, 2007 11:22 am
I tried but then the rain doesnt appear.
highest point of my map is 2850 so when i spawned the efx at 2900 it didnt appear anywhere.
The lowest point is -510 . I wrote this
Code:
pos = player.origin +(x,y,2900) ; 
trace = bulletTrace(pos,pos +(0,0,-550), true, undefined); 

Still nothing. What do i make wrong?
Share |
bangingbernie
General Member
Since: Apr 30, 2004
Posts: 17
Last: Nov 4, 2007
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Friday, Oct. 5, 2007 06:36 pm
Hi,

use this (works perfect):

Code:

main()
{
   level.mapheight = 1000; //over all rooftops
  thread rain();
}
rain()
{
   level._effect["rain"] = loadfx ("fx/misc/rain_heavy.efx");
   level._effect["lightning"] = loadfx ("fx/misc/lightning.efx");

   //lightnings with positions, time (define it for your map) und thunder  
   maps\mp\_fx::loopfx("lightning", (473, 5597, 1207), 25.0);
   maps\mp\_fx::loopfx("lightning", (3614, 4840, 1207), 15.0);
   maps\mp\_fx::loopfx("lightning", (2811, 8271, 1207), 32.0);
   maps\mp\_fx::soundfx("elmthunder", (0, 0, 0));

   while(true)
   {
   players = getentarray("player", "classname");
   for(i=0; i<players.size; i++)
   {
   if (!isAlive(players[i])) continue;
   x = 350 - randomint(700);
   y = 350 - randomint(700);
     //If above the player there is no sky, than no rain
     above = bullettrace( players[i].origin + (x, y, 100), (players[i].origin[0] + x, players[i].origin[1] + y,                     level.mapheight), false, false);
   if (above["fraction"] < .9) continue;
             playfx(level._effect["rain"], above["position"]);
     wait .05;
   }
   wait .05;
   }
} 



edited on Oct. 5, 2007 02:37 pm by bangingbernie
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

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

»