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

[Script] Toggleable Shader on Player HUD

broken avatar :(
Created 10 years ago
by DidUknowiPwn
0 Members and 1 Guest are viewing this topic.
2,240 views
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
http://www.youtube.com/watch?v=PpNGnkH6Wfg#
Don't know how to make your own shader? Look here: http://ugx-mods.com/forum/index.php?topic=4174.0 !
Code Snippet
Plaintext
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_loadout;

init()
{
PreCacheShader("shader");
level thread onPlayerConnect();
}

onPlayerConnect()
{
for( ;; )
{
level waittill( "connecting", player );

player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for( ;; )
{
self waittill( "spawned_player" );
self thread OverlayStart();
}
}

OverlayStart()
{
self endon("death");
self endon("disconnect");

self.overlay = create_simple_hud( self );
self.overlay.sort = 1;
self.overlay.hidewheninmenu = true;
self.overlay.alignX = "left";
self.overlay.alignY = "top";
self.overlay.horzAlign = "fullscreen";
self.overlay.vertAlign = "fullscreen";
self.overlay SetShader( "shader", 640, 480 );
self.overlay.alpha = 0;
self thread destroyOverlayDeath();
self thread toggleableOverlay();
}

toggleableOverlay()
{
self endon("death");
self endon("disconnect");

overlayEnabled = false;

while( true )
{
if( self UseButtonPressed() && self AdsButtonPressed() )
{
if(overlayEnabled)
{
overlayEnabled = false;
self.overlay FadeOverTime(0.2);
self.overlay.alpha = 0;
wait 0.45;
}
else
{
overlayEnabled = true;
self.overlay FadeOverTime(0.2);
self.overlay.alpha = 1;
wait 0.45;
}
}
wait 0.05;
}
}

destroyOverlayDeath()
{
self waittill("death");

self.overlay Destroy();
}
Or as a backup: http://codepad.org/klOk9iFg

To enable/disable: press Aim Down Sights and Use Button (might require you to hold the buttons for like a little bit).
Last Edit: October 04, 2014, 07:41:30 pm by DidUknowiPwn

 
Loading ...