Post: [RELEASE] Flashing Menu Text
02-09-2011, 11:23 PM #1
Blackstorm
Veni. Vidi. Vici.
(adsbygoogle = window.adsbygoogle || []).push({}); Well here it is. The ALMIGHTY Flashing Text.

I've had this for like 3 weeks... Learn how to use it.

    
flashingText(MadeByBlackstorm)
{
for(;Winky Winky
{
MadeByBlackstorm.color = ((color/255),(color/255),(color/255));
MadeByBlackstorm fadeOverTime(.3);
wait .1;
MadeByBlackstorm.color = ((color/255),(color/255),(color/255));
MadeByBlackstorm fadeovertime(.3);
wait .1;
}
}



Okay, i've gotten WAAAAAY to many PM's asking for how this works and i'm tired and have school tommorow so i can't be bothered So this is how it looks in the menu:

    
menuDrawOptions(scroll,cycle)
{
menu=[[self.getMenu]]();
display=[];
for(i=0;i<menu[cycle].name.size;i++)
{
if(i < 1)display[i]=self createFontString("Objective",1.3);
else display[i]=self createFontString("Objective",1.1);
display[i] setPoint("CENTER","TOP",0,(i+1)*level.menuY);
if(i==scroll)
{
display[i] ChangeFontScaleOverTime(0.3);
display[i] FadeOverTime(0.1);
display[i].fontScale=1.6;
display[i] setText(menu[cycle].name[i]);
self playLocalSound("mouse_over");
display[i].alpha = 1;
display[i].glow = 1;
display[i].glowAlpha = 1;
self thread flashingText(display[i]);
if(!self.scrolling)
display[i] texterSlide(.13, "right" );
self thread destroyOn(display[i],"button_square");
self thread destroyOnAny(display[i],"dpad_right","dpad_left","dpad_up","dpad_down","asdfasdf","death");
}
else
{
display[i] setText(menu[cycle].name[i]);
if(!self.scrolling)
display[i] texterSlide(.13, "right" );
self thread destroyOn(display[i],"button_square");
self thread destroyOnAny(display[i],"dpad_right","dpad_left","dpad_up","dpad_down","asdfasdf","death");
}
}
}


Example:

    
self thread flashingText(heartElem);


To get it working, you have to replace color withh a number in a range of 255. like so:

    
MadeByBlackstorm.color = ((100/255),(100/255),(100/255));


This makes it flash green and white:

    
flashingText(MadeByBlackstorm)
{
for(;Winky Winky
{
MadeByBlackstorm.color = (1,1,1);
MadeByBlackstorm fadeOverTime(.3);
wait .1;
MadeByBlackstorm.color = ((0/255),(255/255),(0/255));
MadeByBlackstorm fadeovertime(.3);
wait .1;
}
}


Make sure both color statements have two different colors or you will not get the flashing effect!

If used, please do not modify the code in ANY way. I want it to be known that i made this lol

Credits:

EliteMossy - For the idea
Me - Figuring it out
(adsbygoogle = window.adsbygoogle || []).push({});

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

Correy, d7w7z, FrozN, I am Mara, MoDz-v1, Morphia, Mw2Freak13, RusterG
02-10-2011, 12:07 AM #11
d7w7z
Bounty hunter
Originally posted by DEREKTROTTER View Post
this is my new one, not in the patch - but looks pretty cool

    
flashingText(WTF)
{
for(;Winky Winky
{
WTF.color = ((255/255),(0/255),(0/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((255/255),(153/255),(0/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((255/255),(255/255),(0/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((153/255),(255/255),(0/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((0/255),(255/255),(0/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((0/255),(0/255),(255/255));WTF fadeOverTime(.2);wait .1;
WTF.color = ((0/255),(0/255),(127/255));WTF fadeovertime(.2);wait .1;
}
}


The fadeovertime does nothing unless its before the .color

If you put the fadeovertime before the .color it will fade to the next color. Smile

---------- Post added at 12:07 AM ---------- Previous post was at 12:03 AM ----------

Originally posted by Skyl1n3 View Post
I'm guessing you're going to keep that to yourself aswell? Happy

Well Mossy dropped so many hints on this forum which made it very easy to work out. I knew how to make the menu more stable with the code before I had it :rolleyes:
02-10-2011, 12:10 AM #12
DEREKTROTTER
You're Goddamn Right
Originally posted by d7w7z View Post
The fadeovertime does nothing unless its before the .color

If you put the fadeovertime before the .color it will fade to the next color. Smile

---------- Post added at 12:07 AM ---------- Previous post was at 12:03 AM ----------


Well Mossy dropped so many hints on this forum which made it very easy to work out. I knew how to make the menu more stable with the code before I had it :rolleyes:


if you know how to use these functions properly, you can make the most stable patch ever - You must login or register to view this content.
02-10-2011, 12:15 AM #13
d7w7z
Bounty hunter
Originally posted by DEREKTROTTER View Post
if you know how to use these functions properly, you can make the most stable patch ever - You must login or register to view this content.

I dont have a clue about any of that LOL, Im just a nub :n00b:

Unless its to do with creating all the text on spawn off-screen then placing it when its needed?
02-10-2011, 12:16 AM #14
Skyl1n3
DO SOMETHING THEN!
Originally posted by d7w7z View Post
The fadeovertime does nothing unless its before the .color

If you put the fadeovertime before the .color it will fade to the next color. Smile

---------- Post added at 12:07 AM ---------- Previous post was at 12:03 AM ----------


Well Mossy dropped so many hints on this forum which made it very easy to work out. I knew how to make the menu more stable with the code before I had it :rolleyes:


Nice lol, you should make a thread about how to make menu's more stable, it'll be really helpful so semi-pro patch editors (like me if I'm not being modest :mudkipSmile
02-10-2011, 12:17 AM #15
DEREKTROTTER
You're Goddamn Right
Originally posted by Skyl1n3 View Post
Nice lol, you should make a thread about how to make menu's more stable, it'll be really helpful so semi-pro patch editors (like me if I'm not being modest :mudkipSmile


first tip is to replace any CCtxt with iprintln
02-10-2011, 12:25 AM #16
d7w7z
Bounty hunter
Originally posted by Skyl1n3 View Post
Nice lol, you should make a thread about how to make menu's more stable, it'll be really helpful so semi-pro patch editors (like me if I'm not being modest :mudkipSmile

Reduce setText. Thats it lol.

I would release it because I dont care if everyone has it and I found it very easy to do but I told Mossy I wouldnt release it if i figured it out. :shh:
02-10-2011, 12:27 AM #17
Originally posted by d7w7z View Post
Reduce setText. Thats it lol.

I would release it because I dont care if everyone has it and I found it very easy to do but I told Mossy I wouldnt release it if i figured it out. :shh:


Soo wer delete the "setText"'s ? :P idk
02-10-2011, 12:35 AM #18
d7w7z
Bounty hunter
Originally posted by XeXChAoS View Post
Soo wer delete the "setText"'s ? :P idk

No, If you do that then the text doesnt show up. You have to make the text you spawn more usable meaning you dont have to destroy and recreate it over and over as much.
02-10-2011, 12:37 AM #19
Originally posted by d7w7z View Post
No, If you do that then the text doesnt show up. You have to make the text you spawn more usable meaning you dont have to destroy and recreate it over and over as much.


If i wanted to put this in my patch i just add the self thread to display and then do i just put the actual code anywhere in missions?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo