01-15-2012, 11:32
Hello
Sometime ago I was messing around with some HUD effects and I made a underwater/diving vision, here it is, I think it can be improved a lot more, but I was lazy and hadnt updated it.
This is the vision:
If you want the sound that grenades do when they drop on water, just do this:
In Init():
Add this somewhere on your code:
The preview of the vision was there:
http://www.itsmods.com/forum/Thread-Prev...-Menu.html
Thanks and
Sometime ago I was messing around with some HUD effects and I made a underwater/diving vision, here it is, I think it can be improved a lot more, but I was lazy and hadnt updated it.
This is the vision:
Code:
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 SetBlurForPlayer( 20, 2 );
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 );
If you want the sound that grenades do when they drop on water, just do this:
Code:
self playSound( "grenade_bounce_water" );
In Init():
Code:
precacheShader( "ballistic_overlay" );
Add this somewhere on your code:
Code:
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;
}
The preview of the vision was there:
http://www.itsmods.com/forum/Thread-Prev...-Menu.html
Thanks and