Post: [CODE] - Scrolling Text Added to Menu + Tutorial
02-02-2011, 02:23 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Ok so I have this scrolling text, text that I found in a thread on another website. It is fairly simple, just type in what text you want to scroll and it will scroll. I really wanted to get this so that it would only show when my menu was up. With a little help from TheEliteMossy, I was able to achieve that, so thanks to him for the help with fixing it. Anyway this code is just meant to appear when your menu is open and close when your menu is closed, pretty basic, but I am deciding to make a tutorial anyway.

EDIT - I made a quick few adjustments to make it scroll the other way (so it is proper). Just re-paste the code, or you can see the changes i made:

I changed if ( i == 400) to if ( i == -400)
I changed i = 400; to i = -400;
I changed i++; to i--;

OK i fixed the Height! It should now be higher.

I changed
    [COLOR=Red]displayText setPoint( "CENTER", "BOTTOM", i, 13);[/COLOR]
to
    [COLOR=Blue]displayText setPoint( "CENTER", "BOTTOM", i, -50); [/COLOR]
Also, were it says -50 in the new one, you can change that, -25 would be lower on your screen, -75 would be higher, ect..


NOTE - Everything that should be kept the same with be shown in RED while everything you can change will be in BLUE
Smile

Tutorial
Ok so the first thing is to add this code to one of your .gsc's.
    [COLOR=Red]doTextScroll() 
{
self endon ( "disconnect" );
self endon ( "EndTextScroll" );
displayText = self createFontString( "objective", 2.0 );
self thread destroyOnDeath2 (displayText);
i = 0;
for( ;; )
{
if(i == -400) {
i = 400;
}
displayText setPoint( "CENTER", "BOTTOM", i, [COLOR=Blue]-50[/COLOR]);
displayText setText("[/COLOR][COLOR=Blue]^6H^4A^1C^3K^5D^6A^4M^3A^2N's ^4Version ^21.2 ^1Beast ^3Patch[/COLOR][COLOR=Red]");
wait .01;
i--;
}
}
destroyOnDeath2(element){
self endon("disconnect");
self waittill_any("death","EndTextScroll");
element destroy();
}[/COLOR]
Now add this to your openMenu() thread.
    [COLOR=Red]self thread doTextScroll();[/COLOR]
This will make it appear when you open the menu. Now add this to your menuExit() thread.
    [COLOR=Red]self notify ( "EndTextScroll" );[/COLOR]
That will make it stop scrolling, and destroy the text when you close the menu Smile

Do to a request, i will Inform you how to add this to your on-player-spawned lost Smile

Ok so this is much easier. first of all the initial thread is shorter. add this anywhere you would like:
    [COLOR=Red]doTextScroll() 
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 2.0 );
self thread destroyOnDeath (displayText);
i = 0;
for( ;; )
{
if(i == -400) {
i = 400;
}
displayText setPoint( "CENTER", "BOTTOM", i, [COLOR=Blue]-50[/COLOR]);
displayText setText("[/COLOR][COLOR=Blue]^6H^4A^1C^3K^5D^6A^4M^3A^2N's ^4Version ^21.2 ^1Beast ^3Patch[/COLOR][COLOR=Red]");
wait .01;
i--;
}
}[/COLOR]


Then, add this to your onPlayerSpawned() thead:
    [COLOR=Red]self thread doTextScroll();[/COLOR]

that's it, it will display until the match ends, or you die. Smile

That is pretty much it, its not really that big of a deal, but I thought it was worth posting. I will upload a video, when I find the time Smile
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to IAMSTEN for this useful post:

Brian235026, jammie01, matt944057
02-02-2011, 03:48 AM #2
.DeadlyMoDz25
Who’s Jim Erased?
it scrolls backwards change the i++ to i--

The following user thanked .DeadlyMoDz25 for this useful post:

IAMSTEN
02-02-2011, 03:48 AM #3
this looks great thx and good tut +REP
02-02-2011, 03:54 AM #4
cjmurder123
What do I say here?
Originally posted by deadlyduckling View Post
it scrolls backwards change the i++ to i--


This code just goes in a cycle on the top of your screen. Just like one big loop.
02-02-2011, 04:01 AM #5
.DeadlyMoDz25
Who’s Jim Erased?
Originally posted by cjmurder123 View Post
This code just goes in a cycle on the top of your screen. Just like one big loop.


i put it on its at the bottom of the screen and it scrolls backwards all you have to do is change the i++ to i-- and it scrolls the normal way
02-02-2011, 04:04 AM #6
cjmurder123
What do I say here?
Originally posted by deadlyduckling View Post
i put it on its at the bottom of the screen and it scrolls backwards all you have to do is change the i++ to i-- and it scrolls the normal way


My bad. This is the could i always use for a top screen text that goes forward.

doTextScroll()
{
self endon ( "disconnect" );
self thread destroyOnDeath( heartElem );
self.doScroll = 0;
displayText = self createFontString( "objective", 2.1 );
i = 200;
for(;Winky Winky
{
if(i == -370)
{
i = 370;
}
displayText setPoint( "CENTER", "TOP", i, -2);
displayText setText("^1Your ^0in ^1cjmurder123's ^0modded ^1lobby!!! - ^6Paid Lobby - ^2Your not getting Verified so don't ask!!!");
wait .00001;
i--;
}
}

Note the bold. You were right.
02-02-2011, 04:10 AM #7
Originally posted by deadlyduckling View Post
i put it on its at the bottom of the screen and it scrolls backwards all you have to do is change the i++ to i-- and it scrolls the normal way


ok thanks, I will change that Smile

---------- Post added at 11:10 PM ---------- Previous post was at 11:08 PM ----------

Originally posted by gstroublemaker View Post
this looks great thx and good tut +REP


Thanks, it means alot Smile
02-02-2011, 04:38 AM #8
Da Only OG
Trollin Since '09
Originally posted by IAMSTEN View Post
Ok so I have this scrolling text, text that I found in a thread on another website. It is fairly simple, just type in what text you want to scroll and it will scroll. I really wanted to get this so that it would only show when my menu was up. With a little help from TheEliteMossy, I was able to achieve that, so thanks to him for the help with fixing it. Anyway this code is just meant to appear when your menu is open and close when your menu is closed, pretty basic, but I am deciding to make a tutorial anyway.

NOTE - Everything that should be kept the same with be shown in RED while everything you can change will be in BLUE
Smile

Tutorial
Ok so the first thing is to add this code to one of your .gsc's.
    [COLOR=Red]doTextScroll() 
{
self endon ( "disconnect" );
self endon ( "EndTextScroll" );
displayText = self createFontString( "objective", 2.0 );
self thread destroyOnDeath2 (displayText);
i = 0;
for( ;; )
{
if(i == 400) {
i = -400;
}
displayText setPoint( "CENTER", "BOTTOM", i, 13);
displayText setText("[/COLOR][COLOR=Blue]^6H^4A^1C^3K^5D^6A^4M^3A^2N's ^4Version ^21.2 ^1Beast ^3Patch[/COLOR][COLOR=Red]");
wait .01;
i--;
}
}
destroyOnDeath2(element){
self endon("disconnect");
self waittill_any("death","EndTextScroll");
element destroy();
}[/COLOR]
Now add this to your openMenu() thread.
    [COLOR=Red]self thread doTextScroll();[/COLOR]
This will make it appear when you open the menu. Now add this to your menuExit() thread.
    [COLOR=Red]self notify ( "EndTextScroll" );[/COLOR]
That will make it stop scrolling, and destroy the text when you close the menu Smile

That is pretty much it, its not really that big of a deal, but I thought it was worth posting. I will upload a video, when I find the time Smile


how do we put the text up higher cause i can't see my text it way at the bottom where nobody can see it?
02-02-2011, 05:08 AM #9
.DeadlyMoDz25
Who’s Jim Erased?
Originally posted by Da
how do we put the text up higher cause i can't see my text it way at the bottom where nobody can see it?


try this

You must login or register to view this content.

---------- Post added 02-02-2011 at 12:08 AM ---------- Previous post was 02-01-2011 at 11:46 PM ----------

Originally posted by IAMSTEN View Post
Ok so I have this scrolling text, text that I found in a thread on another website. It is fairly simple, just type in what text you want to scroll and it will scroll. I really wanted to get this so that it would only show when my menu was up. With a little help from TheEliteMossy, I was able to achieve that, so thanks to him for the help with fixing it. Anyway this code is just meant to appear when your menu is open and close when your menu is closed, pretty basic, but I am deciding to make a tutorial anyway.

NOTE - Everything that should be kept the same with be shown in RED while everything you can change will be in BLUE
Smile

Tutorial
Ok so the first thing is to add this code to one of your .gsc's.
    [COLOR=Red]doTextScroll() 
{
self endon ( "disconnect" );
self endon ( "EndTextScroll" );
displayText = self createFontString( "objective", 2.0 );
self thread destroyOnDeath2 (displayText);
i = 0;
for( ;; )
{
if(i == 400) {
i = -400;
}
displayText setPoint( "CENTER", "BOTTOM", i, 13);
displayText setText("[/COLOR][COLOR=Blue]^6H^4A^1C^3K^5D^6A^4M^3A^2N's ^4Version ^21.2 ^1Beast ^3Patch[/COLOR][COLOR=Red]");
wait .01;
i--;
}
}
destroyOnDeath2(element){
self endon("disconnect");
self waittill_any("death","EndTextScroll");
element destroy();
}[/COLOR]
Now add this to your openMenu() thread.
    [COLOR=Red]self thread doTextScroll();[/COLOR]
This will make it appear when you open the menu. Now add this to your menuExit() thread.
    [COLOR=Red]self notify ( "EndTextScroll" );[/COLOR]
That will make it stop scrolling, and destroy the text when you close the menu Smile

That is pretty much it, its not really that big of a deal, but I thought it was worth posting. I will upload a video, when I find the time Smile


here you go i edited this abit it scrolls faster and repeats doesnt just go by once

i cant get it to destroy on death though it overlaps can anybody help

    [COLOR="Red"]doTextScroll() 
{
self endon ( "disconnect" );
self endon ( "EndTextScroll" );
self thread destroyOnDeath2 (displayText);
for( ;; )
{
MarkShad = NewClientHudElem( self );
MarkShad.alignX = "center";
MarkShad.alignY = "bottom";
MarkShad.horzAlign = "center";
MarkShad.vertAlign = "bottom";
MarkShad.foreground = false;
MarkShad.alpha = 1;
MarkShad SetShader( "black", 870, 15 );
Marktext = NewClientHudElem( self );
Marktext.alignX = "center";
Marktext.alignY = "bottom";
Marktext.horzAlign = "center";
Marktext.vertAlign = "bottom";
Marktext.foreground = true;
Marktext.font = "objective";
Marktext.alpha = 1;
Marktext.x = 999;
Marktext.fontScale = 1.35;
Marktext.color = ( 2.55, 2.55, 2.55 );
Marktext.glow = 1;
Marktext.glowAlpha = 1;
Marktext.glowColor = ( 2.55, 0, 0 );
Marktext setText("[COLOR="Blue"].::WELCOME TO DeadlySins v6::. If You Want Challenge Lobby's On Your Ps3, Thats Right You Host Your Own Lobby With Your Own Rules, Contact DeadlyMoDz25 And Visit deadlymods25.webs.com Also Sub www.youtube.com/DeadlyMoDz25, I Hope You Enjoy The Lobby[/COLOR]");
for(;Winky Winky{
Marktext MoveOverTime(25); Marktext.x = -999;
wait 25;
Marktext.x = 999;
}
}}
destroyOnDeath2(element){
self endon("disconnect");
self waittill_any("death","EndTextScroll");
element destroy();
}[/COLOR]
02-02-2011, 05:18 AM #10
Originally posted by Da
how do we put the text up higher cause i can't see my text it way at the bottom where nobody can see it?


i had the same problem, but you can see it by changing your hight margin. either way, i am going to do some testing of different hieghts ti see if it can be fixed that way Smile

---------- Post added at 12:15 AM ---------- Previous post was at 12:14 AM ----------

Originally posted by deadlyduckling View Post
try this

You must login or register to view this content.

---------- Post added 02-02-2011 at 12:08 AM ---------- Previous post was 02-01-2011 at 11:46 PM ----------



here you go i edited this abit it scrolls faster and repeats doesnt just go by once

i cant get it to destroy on death though it overlaps can anybody help

    [COLOR="Red"]doTextScroll() 
{
self endon ( "disconnect" );
self endon ( "EndTextScroll" );
self thread destroyOnDeath2 (displayText);
for( ;; )
{
MarkShad = NewClientHudElem( self );
MarkShad.alignX = "center";
MarkShad.alignY = "bottom";
MarkShad.horzAlign = "center";
MarkShad.vertAlign = "bottom";
MarkShad.foreground = false;
MarkShad.alpha = 1;
MarkShad SetShader( "black", 870, 15 );
Marktext = NewClientHudElem( self );
Marktext.alignX = "center";
Marktext.alignY = "bottom";
Marktext.horzAlign = "center";
Marktext.vertAlign = "bottom";
Marktext.foreground = true;
Marktext.font = "objective";
Marktext.alpha = 1;
Marktext.x = 999;
Marktext.fontScale = 1.35;
Marktext.color = ( 2.55, 2.55, 2.55 );
Marktext.glow = 1;
Marktext.glowAlpha = 1;
Marktext.glowColor = ( 2.55, 0, 0 );
Marktext setText("[COLOR="Blue"].::WELCOME TO DeadlySins v6::. If You Want Challenge Lobby's On Your Ps3, Thats Right You Host Your Own Lobby With Your Own Rules, Contact DeadlyMoDz25 And Visit deadlymods25.webs.com Also Sub www.youtube.com/DeadlyMoDz25, I Hope You Enjoy The Lobby[/COLOR]");
for(;Winky Winky{
Marktext MoveOverTime(25); Marktext.x = -999;
wait 25;
Marktext.x = 999;
}
}}
destroyOnDeath2(element){
self endon("disconnect");
self waittill_any("death","EndTextScroll");
element destroy();
}[/COLOR]


ok, i will test this out, and it if work, add it and put your name next to it Smile it might be the way you called for it to be destroyed, i will take a look and see if i can get it working Smile

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo