Post: Help please
01-20-2012, 01:32 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I am using Su AriZonaa's menu and I need help with two things.
1.How do I get the over flow fix?
2.I am not able to record it so if you could test on your pc, but when i open the vertical menu after i go back to the horizontal it still clicks on the vertical menu, i am able to tell because i have it click iprintln and it shows the current option in the vertical menu.
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;
Jared()
{
self endon("death");
self endon("disconnect");
self.m["color"]=(1,0,0);
self thread Monitor();
self thread DoD();
self.vMenu=false;
self.hMenu=false;
}
CreateTextLine(fontsize,xOffset,yOffset,xNum,yNum,textz,sort,alpha)
{
text=createFontString("objective",fontsize,self);
text SetPoint(xOffset,yOffset,xNum,yNum);
text Settext(textz);
text.foreground=true;
text.alpha=alpha;
text.sort=sort;
return text;
}
cR(align,relative,x,y,width,height,shader,sort,alpha,c)
{
H=newClientHudElem(self);
H.elemType="bar";
if(!level.splitScreen)
{
H.x=-2;
H.y=-2;
}
H.width=width;
H.height=height;
H.align=align;
H.relative=relative;
H.xOffset=0;
H.yOffset=0;
H.children=[];
H.sort=sort;
H.alpha=alpha;
H.color=c;
H setParent(level.uiParent);
H setShader(shader,width,height);
H.hidden=false;
H setPoint(align,relative,x,y);
return H;
}
ElemFade(time,alpha)
{
self fadeovertime(time);
self.alpha=alpha;
}
ElemMove(time,x,y)
{
self moveovertime(time);
self.x=x;
self.y=y;
}
Monitor()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(self AttackButtonPressed())
{
if(self.hMenu==true && self.vMenu==false)
{
self.mCur++;
self.Cursm MoveOverTime(.25);
self.Cursm.x=self.Dispm[self.mCur].x;
}
if(self.vMenu==true)
{
self.sCur++;
self.Curss MoveOverTime(.25);
self.Curss.y=self.Disps[self.sCur].y;
}
wait .3;
}
if(self AdsButtonPressed())
{
if(self.hMenu==true && self.vMenu==false)
{
self.mCur--;
self.Cursm MoveOverTime(.25);
self.Cursm.x=self.Dispm[self.mCur].x;
}
if(self.vMenu==true)
{
self.sCur--;
self.Curss MoveOverTime(.25);
self.Curss.y=self.Disps[self.sCur].y;
}
wait .3;
}
if(self UseButtonPressed())
{
if(self.hMenu==true && self.vMenu==false)
{
self.Cursm ElemFade(.1,1);
wait .1;
self.Cursm ElemFade(.1,.5);
self thread [[self.func[self.mCur]]](self.arg[self.mCur]);
}
if(self.vMenu==true)
{
self.Curss ElemFade(.1,1);
wait .1;
self.Curss ElemFade(.1,.5);
self thread [[self.sFunc[self.sMenu][self.sCur]]](self.sArg[self.sMenu][self.sCur]);
}
wait .1;
}
if(self FragButtonPressed())
{
if(self.hMenu==false)
{
self setClientDvar("cg_drawHUD",0);
self thread HoriZMenu();
self freezecontrols(true);
wait .1;
self.hMenu=true;
}
else if(self.hMenu==true && self.vMenu==false)
{
self freezecontrols(false);
self setClientDvar("cg_drawHUD",1);
self thread exit("m");
for(i=0;i<10;i++)self.Dispm ElemFade(1,0);
wait 1.1;
for(z=0;z<10;z++)self.Dispm[z] destroy();
self notify("mExit");
self.hMenu=false;
}
if(self.vMenu==true)
{
self thread exit("s");
for(i=0;i<10;i++)self.Disps ElemFade(1,0);
wait 1.1;
for(z=0;z<10;z++)self.Disps[z] destroy();
self thread HoriZMenu();
self notify("sExit");
}
}
wait .05;
}
}
exit(x){
self endon(x+"Exit");
self.info ElemFade(1,0);
if(x=="m"){self.Backm ElemMove(.5,0,-100);self.iBack ElemMove(.5,0,100);self.Cursm ElemMove(.5,-500,self.Cursm.y);}
else{self.titlez ElemFade(1,0);self.Backs ElemFade(1,0);self.Curss ElemFade(1,0);}
wait 1;
self.Curs[x] destroy();
self.Back[x] destroy();
self.titlez destroy();
self.info destroy();
self.iBack destroy();
}
DoD(x)
{
self waittill("death");
self.Curs[x] destroy();
self.Back[x] destroy();
self.iBack destroy();
self.titlez destroy();
for(z=0;z<20;z++)self.Disp[x][z] destroy();
}
HoriZMenu()
{
self.vMenu=false;
self.iBack=self cR("BOTTOMCENTER","BOTTOMCENTER",0,100,1000,25,"white",-100,.9,(0,0,0));
self.Cursm=self cR("TOPCENTER","TOPCENTER",300,0,125,23,"white",75,.5,self.m["color"]);
self.Backm=self cR("TOPCENTER","TOPCENTER",0,-100,1000,35,"white",50,.9,(0,0,0));
self endon("mExit");
self endon("death");
self endon("disconnect");
self.main=[];
self.func=[];
self.arg=[];
self.mCur=0;
self.main[0]="SubMenu 1";
self.main[1]="SubMenu 2";
self.main[2]="SubMenu 3";
self.main[3]="SubMenu 4";
self.main[4]="SubMenu 5";
self.main[5]="SubMenu 6";
self.func[0]=::Sub;
self.func[1]=::sub;
self.func[2]=::sub;
self.func[3]=::sub;
self.func[4]=::sub;
self.func[5]=::sub;
self.arg[0]=0;
self.arg[1]=1;
self.arg[2]=2;
self.arg[3]=3;
self.arg[4]=4;
self.arg[5]=5;
self.info=self CreateTextLine(1.4,"CENTER","CENTER",0,228,"^7[{+frag}] - Exit Menu | [{+usereload}] - Select Option | [{+attack]} - Scroll Right | [{+toggleads_throw}] - Scroll Left",500,0);
for(i=0;i<=self.main.size+1;i++)
{
self.Dispm=self CreateTextLine(1.6,"TOPCENTER","TOPCENTER",(i*125)-325,7.5,self.main,100,0);
self.Dispm ElemFade(1,1);
self.info ElemFade(1,1);
}
self.Cursm ElemMove(.5,self.Dispm[0].x,self.Dispm[0].y-1);
self.Backm ElemMove(.5,0,0);
self.iBack ElemMove(.5,0,1);
for(;Winky Winky
{
if(self.mCur<0)self.mCur=self.main.size-1;
self.Cursm.x=self.Dispm[self.mCur].x;
if(self.mCur>self.main.size-1)self.mCur=0;
self.Cursm.x=self.Dispm[self.mCur].x;
wait .05;
}
}
Sub(num)
{
self endon("sExit");
self endon("death");
self endon("disconnect");
self notify("mExit");
self.Backs=self cR("CENTER","CENTER",0,-500,350,500,"white",50,.9,(0,0,0));
self.Curss=self cR("CENTER","CENTER",0,-250,350,20,"white",100,.5,self.m["color"]);
self.vMenu=true;
for(i=0;i<10;i++)self.Dispm ElemFade(1,0);
self.Backm ElemMove(.5,0,-100);
self.Cursm ElemMove(.5,-500,self.Cursm.y);
wait .5;
self.Cursm destroy();
self.Backm destroy();
wait .5;
for(z=0;z<10;z++)self.Dispm[z] destroy();
self.info setText("^7[{+frag}] - Main Menu | [{+usereload}] - Select Option | [{+attack}] - Scroll Right | [{+toggleads_throw}] - Scroll Left");
self.sub=[];
self.sFunc=[];
self.sArg=[];
self.sCur=0;
self.sMenu=num;
self.title[0]="Menu 1";
for(x=0;x<=7;x++){self.sub[0][x]="Option "+x;self.sFunc[0][x]=::test;}
self.title[1]="Menu 2";
for(x=0;x<=7;x++){self.sub[1][x]="Option "+x;self.sFunc[1][x]=::test;}
self.title[2]="Menu 3";
for(x=0;x<=7;x++){self.sub[2][x]="Option "+x;self.sFunc[2][x]=::test;}
self.title[3]="Menu 4";
for(x=0;x<=7;x++){self.sub[3][x]="Option "+x;self.sFunc[3][x]=::test;}
self.title[4]="Menu 5";
for(x=0;x<=7;x++){self.sub[4][x]="Option "+x;self.sFunc[4][x]=::test;}
self.title[5]="Menu 6";
for(x=0;x<=7;x++){self.sub[5][x]="Option "+x;self.sFunc[5][x]=::test;}
self.titlez=self CreateTextLine(3.0,"CENTER","CENTER",0,-210,self.title[num],200,0);
for(x=0;x<10;x++)
{
self.Disps[x]=self CreateTextLine(1.7,"CENTER","CENTER",0,(x*20.4)-175,self.sub[num][x],200,0);
self.Disps[x] ElemFade(1,1);
self.titlez ElemFade(1,1);
}
self.Backs ElemMove(1,0,0);
self.subCurs ElemMove(1,0,self.Disps[0].y);
for(;Winky Winky
{
if(self.sCur<0)self.sCur=self.sub[num].size-1;
self.Curss.y=self.Disps[self.sCur].y;
if(self.sCur>self.sub[num].size-1)self.sCur=0;
self.Curss.y=self.Disps[self.sCur].y;
wait .05;
}
}
test(){self iprintln(self.sCur);}

thanks for your help
(adsbygoogle = window.adsbygoogle || []).push({});
01-20-2012, 09:33 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Don't patronise him, atleast he doesn't start every word he says with a capital letter, also you don't "add" the overflow fix either, you just implement environmental new lines to print it as one string.
I have not been happy with your attitude these last couple of days. No


All you need to do to fix any overflow error is implement a environmental new line after each option name to form one string instead of multiple.


The menu base he is using also allows you to scroll left to right and have the text along the screen (left to right) so he needs to implement the overflow fix but without it making the game create a new line after every option which is easily done Winky Winky.
01-20-2012, 09:36 PM #3
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
I don't think you understand what a environmental new line is. :p


Well i am a 'noob' and only been coding for 3 months so don't confuse me Not Happy or Sad.
01-20-2012, 09:39 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Then don't try and correct something you don't know? idk.


I'm not trying to correct O.o i'm trying to say that he needs to add the overflow fix without using \n god people these day always have to contradict Not Happy or Sad.
01-20-2012, 09:45 PM #5
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Explain to me what the overflow fix is then.
I thought it was just because of the amount of strings it can take being displayed at once or something on the lines of the amount of strings. Gobble


The games gets string overflow because you use to many unlocalized text strings as you know but adding the 'overflow fix' (Yes i put it in ' ' because it doesn't actually fix it) allows you to use multiple lines of text and/or putting the text into a long line on the screen like in this base however it only uses one text string.

That's what i think and to my knowledge is what most others will say what the 'overflow fix' is if you have other ideas well good for you.
01-20-2012, 09:48 PM #6
Originally posted by IVI40A3Fusionz View Post
The games gets string overflow because you use to many unlocalized text strings as you know but adding the 'overflow fix' (Yes i put it in ' ' because it doesn't actually fix it) allows you to use multiple lines of text and/or putting the text into a long line on the screen like in this base however it only uses one text string.

That's what i think and to my knowledge is what most others will say what the 'overflow fix' is if you have other ideas well good for you.


It's really an "overflow probability reduction technique" (OPRT) rather than a fix. (<< yes, I just made that up Dancing )

Every patch will eventually overflow :P
01-20-2012, 09:49 PM #7
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by x. View Post
It's really an "overflow probability reduction technique" (OPRT) rather than a fix. (<< yes, I just made that up Dancing )

Every patch will eventually overflow :P


I like the name Winky Winky and thank you for a nicer reply Smile.
01-20-2012, 09:52 PM #8
Originally posted by IVI40A3Fusionz View Post
I like the name Winky Winky and thank you for a nicer reply Smile.
You should start dropping it into conversations, it could catch on Awesome face
01-20-2012, 09:53 PM #9
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Then what are you arguing about, your acting like I'm missing something about it but I'm not?
I mean this is all this 'fix' really is ain't it:

You must login or register to view this content.


Never said you was missing something you asked me to explain what i thought the 'overflow fix' was an i did simple as that?
Also the 'fix' can be in a different way than that for this menu base (Scrolling Left to Right).
I'm not an argumentative person if you think i sound like im arguing over the internet then you completely need to re-read my post but with a lighter mind Smile.
01-20-2012, 09:56 PM #10
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by reScript
Sorry maybe it was just me, I just really find when people use "Winky Winky" very patronising. :p


But you don't know me so you don't know what i mean when i put Winky Winky lol so sorry if i confused you in anyway Smile.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo