UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Rain

broken avatar :(
Created 2 years ago
by shippuden1592
0 Members and 1 Guest are viewing this topic.
729 views
broken avatar :(
×
broken avatar :(
Location: mxGuanajuato
Date Registered: 5 May 2013
Last active: 2 weeks ago
Posts
229
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
If you do not take risks, you can not create a fut
×
shippuden1592's Groups
www.mediafire.com

 
1.-Open your map in the radiant and add trigger_multiple where you want the sound to be inside.
Add these kvps:
Code Snippet
Plaintext
targetname    inside_rain
2.-Open your zombie_mapname.gsc and below
Code Snippet
Plaintext
//#include maps\zombie_theater_teleporter;
add this:
Code Snippet
Plaintext
#include maps\_weather;
under of:
Code Snippet
Plaintext
main ()
{
add this:
Code Snippet
Plaintext
level._effect["lightning_strike"] = LoadFX( "maps/zombie/fx_zombie_lightning_flash" );
    level._effect["rain_10"]   = LoadFX( "env/weather/fx_rain_sys_heavy" );
    level._effect["rain_9"]  = LoadFX( "env/weather/fx_rain_sys_heavy" );
    level._effect["rain_8"]  = LoadFX( "env/weather/fx_rain_sys_heavy" );
    level._effect["rain_7"]  = LoadFX( "env/weather/fx_rain_sys_heavy" );
    level._effect["rain_6"]  = LoadFX( "env/weather/fx_rain_sys_med" );
    level._effect["rain_5"]  = LoadFX( "env/weather/fx_rain_sys_med" );
    level._effect["rain_4"]  = LoadFX( "env/weather/fx_rain_sys_med" );
    level._effect["rain_3"]  = LoadFX( "env/weather/fx_rain_sys_med" );
    level._effect["rain_2"]  = LoadFX( "env/weather/fx_rain_sys_lght" );
    level._effect["rain_1"]  = LoadFX( "env/weather/fx_rain_sys_lght" );
    level._effect["rain_0"]  = LoadFX( "env/weather/fx_rain_sys_lght" );
you have to look for this line:  
Code Snippet
Plaintext
maps\_zombiemode::main();
under it add this:
Code Snippet
Plaintext
thread weather_control();
at the end of the .gsc add this:
Code Snippet
Plaintext
weather_control()
{
    flag_wait("all_players_connected");

    rainInit( "hard" ); // get rain going
       level thread rainEffectChange( 9, 0.1 );  // tweak initial rain strength ... default is hard
       thread playerWeather(); // make the actual rain effect generate around the players

    level.thunder_sound_active = true; //disable or enable thunder sounds

    players = get_players();
    for(i = 0; i < players.size; i++)
    {
        players[i] thread watchRainSFX();
    }

       level.nextLightning = GetTime() + 1;
       thread lightning( ::lightning_normal, ::lightning_flash );
}

watchRainSFX()
{
    self endon("death");
    self endon("disconnect");
   
    self.isInside = false;
    self.isInsideLoop = false;
    self.isOutsideLoop = false;

    zones = GetEntArray("inside_rain", "targetname");

    while(1)
    {
        for(i = 0; i < zones.size; i++)
        {
            if(self IsTouching(zones[i]))
            {
                self.isInside = true;
                break;
            }
            else
            {
                self.isInside = false;
            }
        }
       
        if(self.isInside)
        {
            if(!self.isInsideLoop)
            {
                iprintln("Jugador isInSide");
                self.isInsideLoop = true;
                self.isOutsideLoop = false;
                self StopLoopSound();
                self PlayLoopSound("rain_inside");
            }
        }
        else
        {
            if(!self.isOutsideLoop)
            {
                iprintln("Jugador isOutSide");
                self.isOutsideLoop = true;
                self.isInsideLoop = false;
                self StopLoopSound();
                self PlayLoopSound("rain_outside");
            }
        }
        wait(0.1);
    }
}

lightning_normal()
{
    wait( 0.05 );
    ResetSunLight();
}

lightning_flash()
{
    SetSunLight( 4, 4, 4.5 );
    SetSunLight( 1, 1, 1.5 );
   
    wait( 0.0014 );  

       SetSunLight( 3, 3, 3.5 );
       SetSunLight( 2, 2, 2.5 );
      SetSunLight( 1.5, 1.5, 2 );
       
       wait( 0.0010 );
 
       SetSunLight( 1, 1, 1.5 );
       SetSunLight( 5, 5, 5.5 );
       
       wait( 0.0011 );
 
       SetSunLight( 4, 4, 4.5 );
       SetSunLight( 1, 1, 1.5 );
       
       wait( 0.0015 );
 
       SetSunLight( 2.5, 2.5, 3 );
}
3.-Put this in your sounds
Code Snippet
Plaintext
rain_outside,raw\sound\amb\weather\rain\outdoor\stereo\stereo_00.wav,evt_2d,,,ambience,97,97,100,0,0,0,default,default,allon,rdefault,5,priority,5,reject,0,0,0,100,100,0,1,2d,loaded,looping,,1,0,97,,quad,0,0,0,0,0,0.5,no,no,none,1000,no,,both,no,no,,,75,no,no,0,0,wma,yes,no,world,event,no,raw\sound\amb\weather\rain\outdoor\stereo\stereo_00_l.xm4,0,raw\sound\amb\weather\rain\outdoor\stereo\stereo_00_l.mp3,0,raw\sound\amb\weather\rain\outdoor\stereo\stereo_00_l.wav,0,mpl_kowloon,all
rain_inside,raw\sound\amb\weather\rain\indoor\stereo\stereo_l.wav,evt_2d,,,ambience,97,97,100,0,0,0,default,default,allon,rdefault,5,priority,5,reject,0,0,0,100,100,0,1,2d,loaded,looping,,1,0,97,,quad,0,0,0,0,0,0.5,no,no,none,1000,no,,both,no,no,,,75,no,no,0,0,wma,yes,no,world,event,no,raw\sound\amb\weather\rain\indoor\stereo\stereo_l.xm4,0,raw\sound\amb\weather\rain\indoor\stereo\stereo_l.mp3,0,raw\sound\amb\weather\rain\indoor\stereo\stereo_l.wav,0,mpl_kowloon,all

thunder_00,raw\sound\amb\weather\thunder\thunder_00.wav,amb_500,,,ambience,95,95,100,100,500,500,log2,log1,allon,rdefault,4,priority,5,reject,-100,100,0,10,50,0,1,3d,loaded,nonlooping,,1,0,95,,default,0,20,120,93,0.5,0.5,no,yes,none,1000,no,,both,no,no,,,65,no,no,0,0,wma,yes,no,world,ambience,no,raw\sound\amb\weather\thunder\thunder_00.xm4,0,raw\sound\amb\weather\thunder\thunder_00.mp3,0,raw\sound\amb\weather\thunder\thunder_00.wav,0,zmb_theater,all
thunder_01,raw\sound\amb\weather\thunder\thunder_01.wav,amb_500,,,ambience,95,95,100,100,500,500,log2,log1,allon,rdefault,4,priority,5,reject,-100,100,0,10,50,0,1,3d,loaded,nonlooping,,1,0,95,,default,0,20,120,93,0.5,0.5,no,yes,none,1000,no,,both,no,no,,,65,no,no,0,0,wma,yes,no,world,ambience,no,raw\sound\amb\weather\thunder\thunder_01.xm4,0,raw\sound\amb\weather\thunder\thunder_01.mp3,0,raw\sound\amb\weather\thunder\thunder_01.wav,0,zmb_theater,all
thunder_02,raw\sound\amb\weather\thunder\thunder_02.wav,amb_500,,,ambience,95,95,100,100,500,500,log2,log1,allon,rdefault,4,priority,5,reject,-100,100,0,10,50,0,1,3d,loaded,nonlooping,,1,0,95,,default,0,20,120,93,0.5,0.5,no,yes,none,1000,no,,both,no,no,,,65,no,no,0,0,wma,yes,no,world,ambience,no,raw\sound\amb\weather\thunder\thunder_02.xm4,0,raw\sound\amb\weather\thunder\thunder_02.mp3,0,raw\sound\amb\weather\thunder\thunder_02.wav,0,zmb_theater,all
thunder_03,raw\sound\amb\weather\thunder\thunder_03.wav,amb_500,,,ambience,95,95,100,100,500,500,log2,log1,allon,rdefault,4,priority,5,reject,-100,100,0,10,50,0,1,3d,loaded,nonlooping,,1,0,95,,default,0,20,120,93,0.5,0.5,no,yes,none,1000,no,,both,no,no,,,65,no,no,0,0,wma,yes,no,world,ambience,no,raw\sound\amb\weather\thunder\thunder_03.xm4,0,raw\sound\amb\weather\thunder\thunder_03.mp3,0,raw\sound\amb\weather\thunder\thunder_03.wav,0,zmb_theater,all
4.-Finally in your zone_source (mod.csv) add this:
Code Snippet
Plaintext
include,rain


 
Loading ...