Post: [SCRIPT] Flashing Text -Smoother-
11-23-2011, 09:47 PM #1
Taylor
Former Black Knight.
(adsbygoogle = window.adsbygoogle || []).push({}); Here's A Video Reference For You:



My Version:
    
CoolText()
{
self.display FadeOverTime( 0.75 ); self.display.color = ( 1, 0, 0 ); wait .75;
self.display FadeOverTime( 0.75 ); self.display.color = ( 0, 1, 0 ); wait .75;
self.display FadeOverTime( 0.75 ); self.display.color = ( 0, 0, 1 ); wait .75;
self.display FadeOverTime( 0.75 ); self.display.color = ( 1, 0, 1 ); wait .75;
self.display FadeOverTime( 0.75 ); self.display.color = ( 0, 1, 1 ); wait .75;
self.display FadeOverTime( 0.75 ); self.display.color = ( 1, 1, 0 ); wait .75;
self thread CoolText();
}


TheFallen's Shorter Version:

Thread From Menu, Or Anywhere Else
    
self thread doFlash(self.display);


    
doFlash(elem)
{
r=randomint(255);
g=randomint(255);
b=randomint(255);
for(;Winky Winky
{
elem FadeOverTime( 0.75 );
elem.color=(r,g,b);
wait .75;
}
}


ReScript's Version:

    
colorFade( color1, color2, freq ){ self.flashing = true; memo = 0; while( self.flashing = true ) { self fadeOverTime( freq ); if ( memo = 0 ){ self.color = color1; memo = 1; } if ( memo = 1 ){ self.color = color2; memo = 0; } wait freq; }}
//starting the flashelement colorFade( (1, 0, 0), (0, 1, 0), 1 );
//ending the flashelement.flashing = false;


NOTE: CHANGE THE "self.display" TO WHATEVER YOUR TEXT CODE IS (Ex: self.MenuText)
(adsbygoogle = window.adsbygoogle || []).push({});

The following 5 users say thank you to Taylor for this useful post:

AndreeU, DlBSY993, iPROFamily, lallyman, Rea
11-26-2011, 05:42 AM #47
pcfreak30
>> PCFreak30.com Happy<<
reScript, I do complement you on your grammar, but your script IS flawed. the while (something = true) would be settings "something" to true, not comparing to the boolean data type. Thats the syntax of VB.NET

For c, c++, c#, and GSC, it must be ==. As for the no way to stop. If you change those comparisons, you can set to false to stop the loop. If you use while(1) instead, you would need to check a variable or use an endon() function.

What you did was general in programming, and wouldn't error but it would run incorrectly in game.

Hope that helps..

Peace..
11-26-2011, 07:48 AM #48
Woof
...hmm
Originally posted by Correy View Post
.

    wait (time);

should be
    wait time;

:p

Originally posted by pcfreak30 View Post
.

Yea I see that now, I really can't get the way this language works, I will just stick with my other languages :p
11-26-2011, 12:27 PM #49
Correy
I'm the Original
Originally posted by reScript View Post
    wait (time);

should be
    wait time;

:p


Yea I see that now, I really can't get the way this language works, I will just stick with my other languages :p


doesn't matter if there is or isn't :p

---------- Post added at 12:27 PM ---------- Previous post was at 12:26 PM ----------

Originally posted by xYARDSALEx View Post
You Make Me Feet Stupid Getthefuckout Lmao


just sharing my code :fa:
that generates from 0-1, in decimals too.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo