Post: [CODE] Text Transitioning
02-03-2011, 01:41 AM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); Here's another code for text transitioning kind of like EliteMossy's Private patch...

    
transitionZoomIn( duration )
{
switch ( self.elemType )
{
case "font":
case "timer":
self.fontScale = 6.3;
self changeFontScaleOverTime( duration );
self.fontScale = self.baseFontScale;
break;
case "icon":
self setShader( self.shader, self.width * 6, self.height * 6 );
self scaleOverTime( duration, self.width, self.height );
break;
}
}


transitionPulseFXIn( inTime, duration )
{
transTime = int(inTime)*1000;
showTime = int(duration)*1000;

switch ( self.elemType )
{
case "font":
case "timer":
self setPulseFX( transTime+250, showTime+transTime, transTime+250 );
break;
default:
break;
}
}


transitionSlideIn( duration, direction )
{
if ( !isDefined( direction ) )
direction = "left";

switch ( direction )
{
case "left":
self.x += 1000;
break;
case "right":
self.x -= 1000;
break;
case "up":
self.y -= 1000;
break;
case "down":
self.y += 1000;
break;
}
self moveOverTime( duration );
self.x = self.xOffset;
self.y = self.yOffset;
}


transitionSlideOut( duration, direction )
{
if ( !isDefined( direction ) )
direction = "left";

gotoX = self.xOffset;
gotoY = self.yOffset;

switch ( direction )
{
case "left":
gotoX += 1000;
break;
case "right":
gotoX -= 1000;
break;
case "up":
gotoY -= 1000;
break;
case "down":
gotoY += 1000;
break;
}

self.alpha = 1;

self moveOverTime( duration );
self.x = gotoX;
self.y = gotoY;
}


transitionZoomOut( duration )
{
switch ( self.elemType )
{
case "font":
case "timer":
self changeFontScaleOverTime( duration );
self.fontScale = 6.3;
case "icon":
self scaleOverTime( duration, self.width * 6, self.height * 6 );
break;
}
}


transitionFadeIn( duration )
{
self fadeOverTime( duration );
if ( isDefined( self.maxAlpha ) )
self.alpha = self.maxAlpha;
else
self.alpha = 1;
}


transitionFadeOut( duration )
{
self fadeOverTime( 0.15 );
self.alpha = 0;
}


You can use these to your advantage for example..

    
display[i] transitionSlideOut(1,"right");



you don't need to add those functions since they are already in _hud_util, but I included the code in case anyone wants to modify it to their liking.. Enjoy
(adsbygoogle = window.adsbygoogle || []).push({});

The following 27 users say thank you to Blackstorm for this useful post:

-SprayzZz-, BuC-ShoTz, cjmurder123, d7w7z, Demmonnixx, esquinera, FrozN, HowsMySHOOTING, icemantom95, IVIaGiiC_IVIoDs, Ju1cy, Kitty=^.^=, legitmod, LINUX♥, LordsOfChaos, Mabez96, maxrox, Morphia, Mw2Freak13, N3G6, Neff, CHAOZ, RusterG, Scrumilation, ViiZiiKz, xCoD_I3eAsT, Zombie
02-06-2011, 02:56 AM #65
oO-GKUSH-Oo
< ^ > < ^ >
Originally posted by .Blackstorm View Post
Here's another code for text transitioning kind of like EliteMossy's Private patch...

    
transitionZoomIn( duration )
{
switch ( self.elemType )
{
case "font":
case "timer":
self.fontScale = 6.3;
self changeFontScaleOverTime( duration );
self.fontScale = self.baseFontScale;
break;
case "icon":
self setShader( self.shader, self.width * 6, self.height * 6 );
self scaleOverTime( duration, self.width, self.height );
break;
}
}


transitionPulseFXIn( inTime, duration )
{
transTime = int(inTime)*1000;
showTime = int(duration)*1000;

switch ( self.elemType )
{
case "font":
case "timer":
self setPulseFX( transTime+250, showTime+transTime, transTime+250 );
break;
default:
break;
}
}


transitionSlideIn( duration, direction )
{
if ( !isDefined( direction ) )
direction = "left";

switch ( direction )
{
case "left":
self.x += 1000;
break;
case "right":
self.x -= 1000;
break;
case "up":
self.y -= 1000;
break;
case "down":
self.y += 1000;
break;
}
self moveOverTime( duration );
self.x = self.xOffset;
self.y = self.yOffset;
}


transitionSlideOut( duration, direction )
{
if ( !isDefined( direction ) )
direction = "left";

gotoX = self.xOffset;
gotoY = self.yOffset;

switch ( direction )
{
case "left":
gotoX += 1000;
break;
case "right":
gotoX -= 1000;
break;
case "up":
gotoY -= 1000;
break;
case "down":
gotoY += 1000;
break;
}

self.alpha = 1;

self moveOverTime( duration );
self.x = gotoX;
self.y = gotoY;
}


transitionZoomOut( duration )
{
switch ( self.elemType )
{
case "font":
case "timer":
self changeFontScaleOverTime( duration );
self.fontScale = 6.3;
case "icon":
self scaleOverTime( duration, self.width * 6, self.height * 6 );
break;
}
}


transitionFadeIn( duration )
{
self fadeOverTime( duration );
if ( isDefined( self.maxAlpha ) )
self.alpha = self.maxAlpha;
else
self.alpha = 1;
}


transitionFadeOut( duration )
{
self fadeOverTime( 0.15 );
self.alpha = 0;
}


You can use these to your advantage for example..

    
display[i] transitionSlideOut(1,"right");



you don't need to add those functions since they are already in _hud_util, but I included the code in case anyone wants to modify it to their liking.. Enjoy


how does it look? like what effect does it make
02-06-2011, 03:57 AM #66
pcfreak30
>> PCFreak30.com Happy<<
You will see. ATM my 1.8 slides in from the top-left. i used the built-in commands, but the concept is the same...
02-06-2011, 06:39 AM #67
Originally posted by icemantom95 View Post
My custom patch.


So all i have to do is add what you said up there to get this working? or do i have to do something else?
02-06-2011, 08:49 AM #68
TheRock_
Climbing up the ladder
dude u leeched this code of mee Cool Troll jkkkkkk nice codes fag, next u should doo talking players code like elite mossy and make it say ovais is sexy

The following user thanked TheRock_ for this useful post:

Blackstorm
02-06-2011, 09:43 AM #69
Blackstorm
Veni. Vidi. Vici.
Originally posted by pcfreak30 View Post
You will see. ATM my 1.8 slides in from the top-left. i used the built-in commands, but the concept is the same...


Yeah I modified the code myself for it to slide diagonally, lol wasn't that hard =D
02-06-2011, 10:15 AM #70
Originally posted by .Blackstorm View Post
Yeah I modified the code myself for it to slide diagonally, lol wasn't that hard =D


Could this actually work?

    r=randomint(255);
g=randomint(255);
b=randomint(255);
self playLocalSound("mouse_over");
display[i] ChangeFontScaleOverTime(0.3);
display[i] FadeOverTime(0.1);
display[i].fontScale=1.6;
display[i] setText( "[" + menu[cycle].name[i] + "]" );
display[i].alpha = 1;
display[i].glow = 1;
display[i].glowColor = ((r/255),(g/255),(b/255));
display[i].glowAlpha = 1;
display[i].color = ((r/255),(g/255),(b/255));
display[i] transitionSlideIn(1,"left");
02-06-2011, 10:22 AM #71
Blackstorm
Veni. Vidi. Vici.
Originally posted by ovais1470 View Post
dude u leeched this code of mee Cool Troll jkkkkkk nice codes fag, next u should doo talking players code like elite mossy and make it say ovais is sexy


Hahaha You're TOO funny :plank:

---------- Post added at 03:22 AM ---------- Previous post was at 03:20 AM ----------

Originally posted by SprayzZz
Could this actually work?

    r=randomint(255);
g=randomint(255);
b=randomint(255);
self playLocalSound("mouse_over");
display[i] ChangeFontScaleOverTime(0.3);
display[i] FadeOverTime(0.1);
display[i].fontScale=1.6;
display[i] setText( "[" + menu[cycle].name[i] + "]" );
display[i].alpha = 1;
display[i].glow = 1;
display[i].glowColor = ((r/255),(g/255),(b/255));
display[i].glowAlpha = 1;
display[i].color = ((r/255),(g/255),(b/255));
display[i] transitionSlideIn(1,"left");



Seems about right. Winky Winky
02-06-2011, 10:28 AM #72
Originally posted by .Blackstorm View Post
Hahaha You're TOO funny :plank:

---------- Post added at 03:22 AM ---------- Previous post was at 03:20 AM ----------




Seems about right. Winky Winky


sorry i ask so many questions. haha. okay so all i should have to do is add
    display[i] transitionSlideIn(1,"left");
to here
    if(i==scroll){
display[i] ChangeFontScaleOverTime(0.3);
display[i].fontScale=1.1;
display[i] setText("[ ^5"+menu[cycle].name[i]+" ^7]");
[COLOR="DeepSkyBlue"]display[i] transitionSlideIn(1,"left");[/COLOR]

and nothing else it should work? It just doesnt seem that easy Haha.
02-06-2011, 10:29 AM #73
Blackstorm
Veni. Vidi. Vici.
Originally posted by SprayzZz
sorry i ask so many questions. haha. okay so all i should have to do is add
    display[i] transitionSlideIn(1,"left");
to here
    if(i==scroll){
display[i] ChangeFontScaleOverTime(0.3);
display[i].fontScale=1.1;
display[i] setText("[ ^5"+menu[cycle].name[i]+" ^7]");
[COLOR="DeepSkyBlue"]display[i] transitionSlideIn(1,"left");[/COLOR]

and nothing else it should work? It just doesnt seem that easy Haha.


Yep that would work lol, but it would just take forever to get it where you'd want it to go

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo