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, 10:52 AM #74
Originally posted by .Blackstorm View Post
Yep that would work lol, but it would just take forever to get it where you'd want it to go


Where would i add it for it to only do that when i go to a submenu?

---------- Post added at 06:52 AM ---------- Previous post was at 06:30 AM ----------

Originally posted by .Blackstorm View Post
Yep that would work lol, but it would just take forever to get it where you'd want it to go


    _openMenu(){
self.MenuIsOpen=true;
self freezeControls(true);
self setBlurForPlayer(10,0.5);
self VisionSetNakedForPlayer("icbm",0.5);
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 999);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2 setshader("black", 355, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);
menu=[[self.getMenu]]();
self.numMenus=menu.size;
self.menuSize=[];
for(i=0;i<self.numMenus;i++)
self.menuSize[i]=menu[i].name.size;
[COLOR="Blue"]display[i] transitionSlideIn(1,"left");[/COLOR]
}


Is that right? It seems like it might be right to me :/ haha.
02-06-2011, 10:54 AM #75
Blackstorm
Veni. Vidi. Vici.
Originally posted by SprayzZz
Where would i add it for it to only do that when i go to a submenu?

---------- Post added at 06:52 AM ---------- Previous post was at 06:30 AM ----------



    _openMenu(){
self.MenuIsOpen=true;
self freezeControls(true);
self setBlurForPlayer(10,0.5);
self VisionSetNakedForPlayer("icbm",0.5);
MenuShad = NewClientHudElem( self );
MenuShad.alignX = "center";
MenuShad.alignY = "center";
MenuShad.horzAlign = "center";
MenuShad.vertAlign = "center";
MenuShad.foreground = false;
MenuShad.alpha = 0.6;
MenuShad setshader("black", 900, 999);
MenuShad2 = NewClientHudElem( self );
MenuShad2.alignX = "center";
MenuShad2.alignY = "center";
MenuShad2.horzAlign = "center";
MenuShad2.vertAlign = "center";
MenuShad2.foreground = false;
MenuShad2.alpha = 0.6;
MenuShad2 setshader("black", 355, 800);
self thread DeleteMenuHudElem(MenuShad);
self thread DeleteMenuHudElem(MenuShad2);
self thread DeleteMenuHudElem2(MenuShad);
self thread DeleteMenuHudElem2(MenuShad2);
menu=[[self.getMenu]]();
self.numMenus=menu.size;
self.menuSize=[];
for(i=0;i<self.numMenus;i++)
self.menuSize[i]=menu[i].name.size;
[COLOR="Blue"]display[i] transitionSlideIn(1,"left");[/COLOR]
}


Is that right? It seems like it might be right to me :/ haha.


That wouldn't work where the heck do you get display from there lol
02-06-2011, 10:56 AM #76
Originally posted by .Blackstorm View Post
That wouldn't work where the heck do you get display from there lol


Copy and paste Happy okay so it has to be somewhere that has display... God i wish you would just tell me Happy you like to tease people with things Haha.
02-06-2011, 10:59 AM #77
Blackstorm
Veni. Vidi. Vici.
Originally posted by SprayzZz
Copy and paste Happy okay so it has to be somewhere that has display... God i wish you would just tell me Happy you like to tease people with things Haha.


no display is a fontstring with an array lol you use this with any fontstring
02-08-2011, 03:42 AM #78
N3G6
SE Pro
Originally posted by THEDUBMAN101 View Post
copied and pasted into notepad my friend Winky Winky lmao EVERYTHING!
im not going to release it again im not a leech :p
Going to make myself a private patch with this stuff on Outie


I did the same thing i wont leech, ur sig is very distracting ♥
02-08-2011, 04:43 AM #79
Someone needs to make a little tut on how to get this working correctly lol. Im failing at it. Not horrible but its just not the way i want it to be :/
02-08-2011, 04:50 AM #80
TheFallen
Former Dark Night
Originally posted by SprayzZz
Someone needs to make a little tut on how to get this working correctly lol. Im failing at it. Not horrible but its just not the way i want it to be :/


You ask too many questions. Expierment and figure it out for yourself.

The following 2 users say thank you to TheFallen for this useful post:

-SprayzZz-, legitmod
02-08-2011, 11:48 AM #81
LINUX♥
The Best OS By Far
Originally posted by NaTo154 View Post
I did the same thing i wont leech, ur sig is very distracting ♥


goodgood Smile my private patch now stands out a lot more :y: ive been PM'ed so many times from people asking for it /facepalm oh and about my sig.......... HaVe YoU ?!?!! Lmao XD
02-12-2011, 06:34 PM #82
Originally posted by .Blackstorm View Post
Here's another code for text transitioning kind of like EliteMossy's Private patch...


    
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 will I add this too the Unkn0wns patch the flashing didn't work :(

    for(;Winky Winky
{
for(i=0;i<self.MenuMaxSize;i++)
{
self.MenuText[i] setText("");
self.SideCategory[0] setText("");
self.SideCategory[1] setText("");
}
if(self.MenuVisible)
{
self.MenuText[0] setText(self.MenuCategory[self.MenuCPos]);
self.SideCategory[0] setText(self.MenuCategory[self.MenuCPos-1]);
self.SideCategory[1] setText(self.MenuCategory[self.MenuCPos+1]);
if(self.MenuCPos==self.MenuCategoryAmmount)
{
self.SideCategory[1] setText(self.MenuCategory[1]);
}
else if(self.MenuCPos==1)
{
self.SideCategory[0] setText(self.MenuCategory[self.MenuCategoryAmmount]);
}
for(i=0;i<self.MenuOptionNum[self.MenuCPos];i++)
{
if(i==self.MenuPos)
{
self.MenuText[i+1] ScaleText(1.6,0.1);
self.MenuText[i+1] setText("^1"+self.MenuOptionText[self.MenuCPos][i]);
self.MenuSelected=self.MenuOptionText[self.MenuCPos][i];
}
else
{
self.MenuText[i+1] ScaleText(1.2,0.1);
self.MenuText[i+1] setText(self.MenuOptionText[self.MenuCPos][i]);
}
}
}
wait 0.05;
}

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo