• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request How to destroy Shaders
#1
Sad 
Hi everyone, im looking for a code to destroy this:

Code:
DayNightNext()
{
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("dpad_up", "+actionslot 3");
    for(;;)
    {
        self waittill("dpad_up");    
                    self setClientDvar( "r_colormap", "1" );
                    self setClientDvar( "r_filmUseTweaks", "0" );
                    self setClientDvar( "r_filmTweakEnable", "0" );
                    self iPrintLnBold("^7Night Vision");
                    self setClientDvars( "cg_watersheeting", 1, "cg_waterSheeting_brightness", 0, "cg_waterSheeting_contrast", 1, "cg_waterSheeting_darkTint", 1, "cg_waterSheeting_desaturation", 0, "cg_waterSheeting_distortionScaleFactor", 0.021961, "cg_waterSheeting_enable", 0, "cg_waterSheeting_fadeDuration", 2, "cg_waterSheeting_lightTint", 0.780261, "cg_waterSheeting_magnitude", 0.0655388, "cg_waterSheeting_radius", 4.44051 );
                    self SetWaterSheeting( 1, 3 );
                    self setDepthOfField( 0, 110, 512, 4096, 6, 1.8 );
                    self VisionSetNakedForPlayer( "oilrig_underwater", 0.5 );
                    self.googles = self CreateOverlay( "ballistic_overlay", 1, undefined );
                    self playSound( "grenade_bounce_water" );
                    


        self waittill("dpad_up");    
                    self setClientDvar( "r_filmUseTweaks", "1" );
                    self setClientDvar( "r_filmTweakEnable", "1" );
                    self setClientDvar( "r_filmTweakBrightness", "-0.5" );
                    self setClientDvar( "r_filmTweakDesaturation", "1" );
                    self setClientDvar( "r_filmTweakDesaturation", "1.7" );
                    self setClientDvar( "r_filmTweakContrast", "2" );
                    self setClientDvar( "r_filmTweakDarkTint", "1 1 1" );
                    self setClientDvars( "cg_watersheeting", 1, "cg_waterSheeting_brightness", 0, "cg_waterSheeting_contrast", 1, "cg_waterSheeting_darkTint", 1, "cg_waterSheeting_desaturation", 0, "cg_waterSheeting_distortionScaleFactor", 0.021961, "cg_waterSheeting_enable", 0, "cg_waterSheeting_fadeDuration", 2, "cg_waterSheeting_lightTint", 0.780261, "cg_waterSheeting_magnitude", 0.0655388, "cg_waterSheeting_radius", 4.44051 );
                    self SetWaterSheeting( 1, 3 );
                    self setDepthOfField( 0, 110, 512, 4096, 6, 1.8 );
                    self VisionSetNakedForPlayer( "oilrig_underwater", 0.5 );
                    self.googles = self CreateOverlay( "ballistic_overlay", 1, undefined );
                    self playSound( "grenade_bounce_water" );
        
    }
}
CreateOverlay( names, startalpha, color )
{
    overlay = newHudElem();
    overlay.x = 0;
    overlay.y = 0;
    overlay setshader( names, 640, 480 );
    overlay.alignX = "left";
    overlay.alignY = "top";
    overlay.sort = 1;
    overlay.color = color;
    overlay.horzAlign = "fullscreen";
    overlay.vertAlign = "fullscreen";
    overlay.alpha = startalpha;
    overlay.foreground = true;
    return overlay;
}
this is Yamatos shader code. i want it torn on and off by pressing actionslot 3 but i dont know how. i tryed
Code:
CreateOverlay( names, startalpha, color ) destroy();
and tryed (actually i tryed many other ways)
Code:
newHudElem() destroy();
Code:
self.googles destroy();
i spended about 3-4 hours to find it, and read every thread about HUD elements and shaders but no results, going to sleep now Sad
i hope its easy for someone and i will get support. Thanks you.
  Reply
#2
Try this:
Code:
self.googles destroyElem();
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
#3
(12-01-2012, 11:58)master131 Wrote: Try this:
Code:
self.googles destroyElem();

i ptryed it after 2nd
self waittill("dpad_up");
and nothing happened.
  Reply
#4
Put:

Code:
self.googles.alpha = 0;

to turn it off, and this to turn it on:

Code:
self.googles.alpha = 1;
[Image: veovuq.png]
[-] The following 1 user says Thank You to Yamato for this post:
  • islamsaab
  Reply
#5
I just tested few mins ago. Thank you its works Big Grin
[-] The following 1 user says Thank You to islamsaab for this post:
  • Yamato
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  DESTROY THEM WITH LASERS! JariZ 1 1,407 12-08-2011, 12:45
Last Post: Nekochan
  Help Titles as shaders Lemon 2 944 08-17-2011, 14:03
Last Post: Lemon
  [Release] Some usefull shaders Yamato 11 10,318 08-14-2011, 17:25
Last Post: Yamato
  [Tutorial] Making your own custom shaders Lemon 21 5,486 07-31-2011, 15:56
Last Post: Lemon
  Help Custom Shaders Lemon 1 770 07-01-2011, 09:48
Last Post: d0h!
  [Request] Add custom shaders? iAegle 4 1,181 06-27-2011, 22:39
Last Post: iAegle
  Shaders N' Shit 4FunPlayin 6 1,147 05-31-2011, 17:54
Last Post: Pozzuh
  Flipping images/shaders iAegle 10 2,418 03-17-2011, 16:54
Last Post: iAegle
  [Request] Shaders/Icons 4FunPlayin 5 1,395 03-11-2011, 16:52
Last Post: 4FunPlayin

Forum Jump:


Users browsing this thread: 1 Guest(s)