Hey guys! Im implamenting a scrolling text at teh bottom of the screen into my mod, (its from the quarantine chaos zombie mod), and im having trouble.
My problem occures when my text gets to long... Like if i type more than two sentences, it gets cut off.. I was wondering if the settings are weird and im missing some length limit counter, but please look over it and tell me a way i could make it longer!
Its important to read my \\ comments i put into this code below, it tells you what ive tried and the results.
Code:
CreateServerHUD() \\Defines the text and how it works
{
level.TimerText4 = level createServerFontString( "objective", 5.5 );
level.TimerText4 setPoint( "CENTER", "CENTER", 1110, -100 );
level.scrollleft4 = NewHudElem();
level.scrollleft4.alignX = "center";
level.scrollleft4.alignY = "bottom";
level.scrollleft4.horzAlign = "center";
level.scrollleft4.vertAlign = "bottom";
level.scrollleft4.x = -500;
level.scrollleft4.y = -60;
level.scrollleft4.foreground = true;
level.scrollleft4.fontScale = 2;
level.scrollleft4.font = "hudbig";
level.scrollleft4.alpha = 1;
level.scrollleft4.glow = 1;
level.scrollleft4.glowColor = ( 0, 0, 1 );
level.scrollleft4.glowAlpha = 1;
level.scrollleft4.color = ( 1.0, 1.0, 1.0 );
level.scrollright4 = NewHudElem();
level.scrollright4.alignX = "center";
level.scrollright4.alignY = "bottom";
level.scrollright4.horzAlign = "center";
level.scrollright4.vertAlign = "bottom";
level.scrollright4.x = 500;
level.scrollright4.y = -60;
level.scrollright4.foreground = true;
level.scrollright4.fontScale = 2;
level.scrollright4.font = "hudbig";
level.scrollright4.alpha = 1;
level.scrollright4.glow = 1;
level.scrollright4.glowColor = ( 0, 0, 1 );
level.scrollright4.glowAlpha = 1;
level.scrollright4.color = ( 1.0, 1.0, 1.0 );
level.infotext4 = NewHudElem();
level.infotext4.alignX = "center";
level.infotext4.alignY = "bottom";
level.infotext4.horzAlign = "center";
level.infotext4.vertAlign = "bottom";
level.infotext4.y = 25;
level.infotext4.foreground = true;
level.infotext4.fontScale = 1.35;
level.infotext4.font = "objective";
level.infotext4.alpha = 3;
level.infotext4.glow = 0;
level.infotext4.glowColor = ( 0, 0, 0 );
level.infotext4.glowAlpha = 1;
level.infotext4.color = ( 1.0, 1.0, 1.0 );
level.bar4 = level createServerBar((0.5, 0.5, 0.5), 1000, 25);
level.bar4.alignX = "center";
level.bar4.alignY = "bottom";
level.bar4.horzAlign = "center";
level.bar4.vertAlign = "bottom";
level.bar4.y = 30;
level.bar4.foreground = true;
level thread doInfoScroll2();
}
doInfoScroll2() \\ This is where i think the problem may be solved, but i dont really understand how this all works.
{
self endon("disconnect");
for(i = 1700; i >= -1700; i -= 6) \\I know this 6 means the higher the number the faster teh text scrolls...
{
level.infotext4.x = i;
if(i == -2500){ \\ I tried switching these numbers around, but all it does is make the text scroll in longer/shorter, but doesent actually allow me to type in more text.
i = 1700;
}
wait .005;
}
}
doServerHUDControl() \\The actual text string.
{
self endon("disconnect");
self endon("death");
level.infotext4 setText("^1Here is the text that scrolls across the screen. I will keep typing to shwo you when it gets cutt off. The text is not cut off just yet but it is getting quite close. Now the text is cut of here ->");
If i type anymore than that above it just stops showing up and only shows whats before it!! Im wondering if there may be a limit of size of text that IW allows you to put into a "level.infotext4 setText" string.... Am i right?
Or im just missing something simple above. Thanks!