Post: [TUT]Very Stable Mod Menu
02-17-2011, 12:54 AM #1
d7w7z
Bounty hunter
(adsbygoogle = window.adsbygoogle || []).push({}); Im getting bored of Modding MW2 so Im gonna release this.

When you scroll up/down on your mod menu all the text on your screen is destroyed and is re-made, This means that a large amount of setText is used. When to much setText is used the game crashes, An unstable patch has alot of setText called in it. Using flashing text to change the colour of your text without destroying it can make your mod menu ALOT more stable.

You will need to add this to your functions for Cycling left/right. The functions will be called something like cycleRight and cycleLeft
    self notify("Cycle");

Add this to both of the functions.


Now you want to find your scroll functions. They will be called something along the lines of scrollUp and scrollDown

Remove the following from both functions.
    drawMenu( self.cycle, self.scroll );


Now place this code where the code you just removed was.
    self notify("scroll");



Now go to your drawMenu function. Go down to the bottom of the function and alter it to look something like this.
    for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.2 );
else
display[i] = self createFontString( "objective", 1.2 );
display[i] setPoint( "CENTER", "TOP", 0, i*14 );
display[i] setText( menu[cycle].name[i] ); // Here and below are the important parts!
if (i == scroll) { self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }



Now once you have that done all you need to do is add the code below and you should be good to go.
    UpdateFlash( BlackStorm ) {
self endon("StopFlash");
self endon("Cycle");
for(;Winky Winky {
BlackStorm fadeOverTime(.4);
BlackStorm.color = ((255/255),(0/255),(0/255));
wait 0.31;
BlackStorm fadeOverTime(.3);
BlackStorm.color = ((155/255),(0/255),(0/255));
wait 0.31;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;Winky Winky {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }


Now text is not destroyed when you scroll up/down. This makes the menu ALOT more stable, though it can be more stable.

Any problems quote me.

Credits to BlackStorm for releasing the flashing text and to EliteMossy because he gave me hints on how to make the menu more stable and was also the first person to come up with the idea.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to d7w7z for this useful post:

Blackstorm, Correy, emsp, iJokaa, JordyPordy, N3G6, ProxiesAreFtw, ViiZiiKz, xT4sSin
02-19-2011, 09:54 PM #11
SamMight69Her
CRAZY 4 INK
Originally posted by d7w7z View Post
Im getting bored of Modding MW2 so Im gonna release this.

When you scroll up/down on your mod menu all the text on your screen is destroyed and is re-made, This means that a large amount of setText is used. When to much setText is used the game crashes, An unstable patch has alot of setText called in it. Using flashing text to change the colour of your text without destroying it can make your mod menu ALOT more stable.

You will need to add this to your functions for Cycling left/right. The functions will be called something like cycleRight and cycleLeft
    self notify("Cycle");
Add this to both of the functions.


Now you want to find your scroll functions. They will be called something along the lines of scrollUp and scrollDown

Remove the following from both functions.
    drawMenu( self.cycle, self.scroll );
Now place this code where the code you just removed was.
    self notify("scroll");

Now go to your drawMenu function. Go down to the bottom of the function and alter it to look something like this.
    for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.2 );
else
display[i] = self createFontString( "objective", 1.2 );
display[i] setPoint( "CENTER", "TOP", 0, i*14 );
display[i] setText( menu[cycle].name[i] ); // Here and below are the important parts!
if (i == scroll) { self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }

Now once you have that done all you need to do is add the code below and you should be good to go.
    UpdateFlash( BlackStorm ) {
self endon("StopFlash");
self endon("Cycle");
for(;Winky Winky {
BlackStorm fadeOverTime(.4);
BlackStorm.color = ((255/255),(0/255),(0/255));
wait 0.31;
BlackStorm fadeOverTime(.3);
BlackStorm.color = ((155/255),(0/255),(0/255));
wait 0.31;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;Winky Winky {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }
Now text is not destroyed when you scroll up/down. This makes the menu ALOT more stable, though it can be more stable.

Any problems quote me.

Credits to BlackStorm for releasing the flashing text and to EliteMossy because he gave me hints on how to make the menu more stable and was also the first person to come up with the idea.


every time i press down everything is gone.
02-19-2011, 10:03 PM #12
d7w7z
Bounty hunter
Originally posted by ENT View Post
every time i press down everything is gone.

You have not changed the DestroyOnAny function in drawMenu,
Remove the "dpad_up" and "dpad_down" from the DestroyOnAny

Like so.
    self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
02-19-2011, 10:18 PM #13
SamMight69Her
CRAZY 4 INK
Originally posted by d7w7z View Post
Im getting bored of Modding MW2 so Im gonna release this.

When you scroll up/down on your mod menu all the text on your screen is destroyed and is re-made, This means that a large amount of setText is used. When to much setText is used the game crashes, An unstable patch has alot of setText called in it. Using flashing text to change the colour of your text without destroying it can make your mod menu ALOT more stable.

You will need to add this to your functions for Cycling left/right. The functions will be called something like cycleRight and cycleLeft
    self notify("Cycle");
Add this to both of the functions.


Now you want to find your scroll functions. They will be called something along the lines of scrollUp and scrollDown

Remove the following from both functions.
    drawMenu( self.cycle, self.scroll );
Now place this code where the code you just removed was.
    self notify("scroll");

Now go to your drawMenu function. Go down to the bottom of the function and alter it to look something like this.
    for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.2 );
else
display[i] = self createFontString( "objective", 1.2 );
display[i] setPoint( "CENTER", "TOP", 0, i*14 );
display[i] setText( menu[cycle].name[i] ); // Here and below are the important parts!
if (i == scroll) { self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }

Now once you have that done all you need to do is add the code below and you should be good to go.
    UpdateFlash( BlackStorm ) {
self endon("StopFlash");
self endon("Cycle");
for(;Winky Winky {
BlackStorm fadeOverTime(.4);
BlackStorm.color = ((255/255),(0/255),(0/255));
wait 0.31;
BlackStorm fadeOverTime(.3);
BlackStorm.color = ((155/255),(0/255),(0/255));
wait 0.31;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;Winky Winky {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }
Now text is not destroyed when you scroll up/down. This makes the menu ALOT more stable, though it can be more stable.

Any problems quote me.

Credits to BlackStorm for releasing the flashing text and to EliteMossy because he gave me hints on how to make the menu more stable and was also the first person to come up with the idea.

i did everything right but when i press up now it crashes.
02-19-2011, 10:43 PM #14
d7w7z
Bounty hunter
Originally posted by ENT View Post
i did everything right but when i press up now it crashes.

You must have done something wrong because its working for me and others. Maybe a copy and paste error?
02-19-2011, 10:48 PM #15
SamMight69Her
CRAZY 4 INK
Originally posted by d7w7z View Post
You must have done something wrong because its working for me and others. Maybe a copy and paste error?


    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.2 );
else
display[i] = self createFontString( "objective", 1.2 );
display[i] setPoint( "CENTER", "TOP", 0, i*14 );
display[i] setText( menu[cycle].name[i] ); // Here and below are the important parts!
if (i == scroll) { self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }


    menuRight(){
self.cycle++;
self.scroll=1;
self notify("Cycle");
menuCheckCycle();
menuDrawHeader(self.cycle);
menuDrawOptions(self.scroll,self.cycle);
}
menuLeft(){
self.cycle--;
self.scroll=1;
self notify("Cycle");
menuCheckCycle();
menuDrawHeader(self.cycle);
menuDrawOptions(self.scroll,self.cycle);
}
menuUp(){
self.scroll--;
menuCheckScroll();
self notify("scroll");
}
menuDown(){
self.scroll++;
menuCheckScroll();
self notify("scroll");
}
02-20-2011, 12:00 AM #16
ooooooooooooo, thankyou
02-20-2011, 12:23 AM #17
EliteMossy
TheDigitalBoard.com
Originally posted by d7w7z View Post
Im getting bored of Modding MW2 so Im gonna release this.

When you scroll up/down on your mod menu all the text on your screen is destroyed and is re-made, This means that a large amount of setText is used. When to much setText is used the game crashes, An unstable patch has alot of setText called in it. Using flashing text to change the colour of your text without destroying it can make your mod menu ALOT more stable.

You will need to add this to your functions for Cycling left/right. The functions will be called something like cycleRight and cycleLeft
    self notify("Cycle");

Add this to both of the functions.


Now you want to find your scroll functions. They will be called something along the lines of scrollUp and scrollDown

Remove the following from both functions.
    drawMenu( self.cycle, self.scroll );


Now place this code where the code you just removed was.
    self notify("scroll");



Now go to your drawMenu function. Go down to the bottom of the function and alter it to look something like this.
    for( i = 0; i < menu[cycle].name.size; i++ ){
if(i < 1)
display[i] = self createFontString( "objective", 1.2 );
else
display[i] = self createFontString( "objective", 1.2 );
display[i] setPoint( "CENTER", "TOP", 0, i*14 );
display[i] setText( menu[cycle].name[i] ); // Here and below are the important parts!
if (i == scroll) { self thread UpdateFlash( display[i] ); }
self thread flashingText( display[i], i );
self thread destroyOnAny( display[i], "dpad_right", "dpad_left","button_square", "death" );
} }



Now once you have that done all you need to do is add the code below and you should be good to go.
    UpdateFlash( BlackStorm ) {
self endon("StopFlash");
self endon("Cycle");
for(;Winky Winky {
BlackStorm fadeOverTime(.4);
BlackStorm.color = ((255/255),(0/255),(0/255));
wait 0.31;
BlackStorm fadeOverTime(.3);
BlackStorm.color = ((155/255),(0/255),(0/255));
wait 0.31;
} }
flashingText( F, ID ) {
self endon("Cycle");
for(;Winky Winky {
self waittill("scroll");
self notify("StopFlash");
wait .01;
if(ID != self.scroll) { F.color = ((255/255),(255/255),(255/255)); }
if (self.scroll == ID) {
self thread UpdateFlash( F );
} } }


Now text is not destroyed when you scroll up/down. This makes the menu ALOT more stable, though it can be more stable.

Any problems quote me.

Credits to BlackStorm for releasing the flashing text and to EliteMossy because he gave me hints on how to make the menu more stable and was also the first person to come up with the idea.


Now you can see how my menu works :carling:
02-20-2011, 01:59 AM #18
The_Platypus
Live Life, Play Cod
cool thanks il attempt to put this in my patch
02-20-2011, 02:54 AM #19
d7w7z
Bounty hunter
Originally posted by EliteMossy View Post
Now you can see how my menu works :carling:

Its about time. :black:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo