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-05-2011, 07:49 PM #56
FrozN
Look up my Patch Edits :P
Originally posted by MecAj View Post
Remember those GSC's DEREKTROTTER Released? Look in those, also look at the top of your GSC's where it says #include =D


LOLOL. Didnt think of looking in there. Thanks.
And the one on top of my .gsc i saw, but i couldnt seem to find it. :420:

And BTW i saw you told mossy that you found his flashing text too, is it in there? Happy
02-05-2011, 07:51 PM #57
Blackstorm
Veni. Vidi. Vici.
Originally posted by FrozN View Post
LOLOL. Didnt think of looking in there. Thanks.
And the one on top of my .gsc i saw, but i couldnt seem to find it. :420:

And BTW i saw you told mossy that you found his flashing text too, is it in there? Happy


No the flashing text, you MUST code your own script, if you use anything premade, the menu messes up :p
02-05-2011, 07:54 PM #58
FrozN
Look up my Patch Edits :P
Originally posted by MecAj View Post
No the flashing text, you MUST code your own script, if you use anything premade, the menu messes up :p


Ohh. :mad:
BTW do you have Jarniboys patch? Happy
02-05-2011, 08:05 PM #59
Thanks for this dude just put it in my patch. I used this transition:display transitionSlideIn(1,"left");
02-05-2011, 08:07 PM #60
Mw2Freak13
Climbing up the ladder
Originally posted by icemantom95 View Post
Thanks for this dude just put it in my patch. I used this transition:display transitionSlideIn(1,"left");


Where do you put this in your patch Im putting it wrong because when I open mod menu the words just dissapear lol plz help?
02-05-2011, 08:11 PM #61
Originally posted by Mw2Freak13 View Post
Where do you put this in your patch Im putting it wrong because when I open mod menu the words just dissapear lol plz help?


I just put the code at the end off the bit where it says display. So mine looks something like this:
r=randomint(255);
g=randomint(255);
b=randomint(255);
self playLocalSound("mouse_over");
display ChangeFontScaleOverTime(0.3);
display FadeOverTime(0.1);
display.fontScale=1.6;
display setText( "[" + menu[cycle].name + "]" );
display.alpha = 1;
display.glow = 1;
display.glowColor = ((r/255),(g/255),(b/255));
display.glowAlpha = 1;
display.color = ((r/255),(g/255),(b/255));
display transitionSlideIn(1,"left");
02-05-2011, 08:13 PM #62
Mw2Freak13
Climbing up the ladder
Originally posted by icemantom95 View Post
I just put the code at the end off the bit where it says display. So mine looks something like this:
r=randomint(255);
g=randomint(255);
b=randomint(255);
self playLocalSound("mouse_over");
display ChangeFontScaleOverTime(0.3);
display FadeOverTime(0.1);
display.fontScale=1.6;
display setText( "[" + menu[cycle].name + "]" );
display.alpha = 1;
display.glow = 1;
display.glowColor = ((r/255),(g/255),(b/255));
display.glowAlpha = 1;
display.color = ((r/255),(g/255),(b/255));
display transitionSlideIn(1,"left");


What patch are you using?
02-05-2011, 08:14 PM #63
Originally posted by Mw2Freak13 View Post
What patch are you using?


My custom patch.
02-05-2011, 08:17 PM #64
Mw2Freak13
Climbing up the ladder
Originally posted by icemantom95 View Post
My custom patch.


Oh lol Happy

too short

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo