Thread Rating:
  • 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;
Reply

#5
I just tested few mins ago. Thank you its works Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  DESTROY THEM WITH LASERS! JariZ 1 2,626 12-08-2011, 12:45
Last Post: Nekochan
  Help Titles as shaders Lemon 2 2,733 08-17-2011, 14:03
Last Post: Lemon
  [Release] Some usefull shaders Yamato 11 19,253 08-14-2011, 17:25
Last Post: Yamato
  [Tutorial] Making your own custom shaders Lemon 21 12,890 07-31-2011, 15:56
Last Post: Lemon
  Help Custom Shaders Lemon 1 2,360 07-01-2011, 09:48
Last Post: d0h!
  [Request] Add custom shaders? iAegle 4 3,463 06-27-2011, 22:39
Last Post: iAegle
  Shaders N' Shit 4FunPlayin 6 4,114 05-31-2011, 17:54
Last Post: Pozzuh
  Flipping images/shaders iAegle 10 6,920 03-17-2011, 16:54
Last Post: iAegle
  [Request] Shaders/Icons 4FunPlayin 5 4,019 03-11-2011, 16:52
Last Post: 4FunPlayin

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.