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-24-2011, 07:46 PM #29
Correy
I'm the Original
Originally posted by Tanskin View Post
    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;
}
}

1. Incorrect syntax for while loops an if statements
2. No point for the 'memo' variable; if your going to cycle through both colors anyways

    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;
}
}

1. RGB values have to divided by 255
2. No way to end script
3. Only one color per call to the thread


Taskin =D, a break; and a waittill would sort it perfect Smile
11-24-2011, 07:47 PM #30
Correy
I'm the Original
Originally posted by xYARDSALEx View Post
WHo Cares If It Doesnt End, And It Won't Syntex

---------- Post added at 02:43 PM ---------- Previous post was at 02:43 PM ----------



What Are You Talking About????


did i quote you or ITheFallenI :confused: ?
11-24-2011, 07:50 PM #31
Originally posted by xYARDSALEx View Post
WHo Cares If It Doesnt End, And It Won't Syntex

---------- Post added at 02:43 PM ---------- Previous post was at 02:43 PM ----------



What Are You Talking About????

So you want a script that fades in and out of one color the whole time and can't be stopped? And if your talking about reScript's code; it will syntax if you run it.
11-24-2011, 07:54 PM #32
Woof
...hmm
Originally posted by Tanskin View Post
.


Just thought I would add on what I said above also.
The memo variable is there to keep track at what colour is being used, taking it away would not work, unless you had something like this:
    

colorFade( color1, color2, freq ){ self.flashing = true; memo = 0; while( self.flashing = true ) { self fadeOverTime( freq ); self.color = color1; self fadeOverTime( freq ); self.color = color2; wait freq; }}


That would have the same effect yes but as many people have found out getting the efficient CPU using scripts is vital -
The way I set out was to make sure the (patch, game or ps3) was keeping up to date with the script, very important for high string usage patches also.

Any here's the fix...
    

colorFade( color1, color2, freq ){ self.flashing = true; memo = 0; while( 1 ) { self fadeOverTime( freq ); if ( memo = 0 ){ self.color = color1; memo = 1; } if ( memo = 1 ){ self.color = color2; memo = 0; } if ( !self.flashing ){ break; } wait freq; }}
11-24-2011, 08:18 PM #33
Originally posted by reScript View Post
Just thought I would add on what I said above also.
The memo variable is there to keep track at what colour is being used, taking it away would not work, unless you had something like this:
    

colorFade( color1, color2, freq ){ self.flashing = true; memo = 0; while( self.flashing = true ) { self fadeOverTime( freq ); self.color = color1; self fadeOverTime( freq ); self.color = color2; wait freq; }}


That would have the same effect yes but as many people have found out getting the efficient CPU using scripts is vital -
The way I set out was to make sure the (patch, game or ps3) was keeping up to date with the script, very important for high string usage patches also.

Any here's the fix...
    

colorFade( color1, color2, freq ){ self.flashing = true; memo = 0; while( 1 ) { self fadeOverTime( freq ); if ( memo = 0 ){ self.color = color1; memo = 1; } if ( memo = 1 ){ self.color = color2; memo = 0; } if ( !self.flashing ){ break; } wait freq; }}

Here. This is basically what you were doing.
    trollCopter()
{
variable = 1;
while( 1 )
{
if( variable == 1 ) //obviously it's equal to one since you set it to one above
{
variable = 0;
}
if( variable == 0 ) //it's obviously going to be zero, since you set it to zero above
{
variable = 1; //z0mg, let's repeat this useless process
}
wait .130910;
}
}


Now, can you please explain to me how that's more efficient than this.

    doFlash()
{
self endon( "flashEnd" );
while( 1 )
{
self fadeOverTime( .7 );
self.color = ( randomFloat( 1 ), randomFloat( 1 ), randomFloat( 1 ) );
wait .75;
}
}


Also, your 'fix' still has syntax errors...

The following 3 users groaned at Tanskin for this awful post:

Woof, 247Yamato, Taylor
11-24-2011, 08:20 PM #34
Woof
...hmm
Originally posted by Tanskin View Post
.

Obviously you did not read my last post carefully.

The following user thanked Woof for this useful post:

Taylor
11-24-2011, 08:28 PM #35
Originally posted by reScript View Post
Obviously you did not read my last post carefully.

:derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp:

I guess I'll end this argument, considering I can't read. If you have anything more to say, please PM me, instead of ruining the thread.

The following user groaned Tanskin for this awful post:

Taylor
11-24-2011, 08:59 PM #36
Woof
...hmm
Originally posted by Tanskin View Post
:derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp::derp:

I guess I'll end this argument, considering I can't read. If you have anything more to say, please PM me, instead of ruining the thread.

Ruining the thread?
I'm not the one posting 15 of the same emotions in a line.

The following user thanked Woof for this useful post:

Taylor
11-24-2011, 11:16 PM #37
Originally posted by reScript View Post
Ruining the thread?
I'm not the one posting 15 of the same emotions in a line.

So? Your the one who's keeping this dumb argument going on. I don't even care about what you have to say. All I said was that two of the versions posted in the OP were flawed, which they were, but you had to make it into something more.

Your exactly the reason why I haven't bothered posting on this forum in over a year.

The following user groaned Tanskin for this awful post:

Taylor

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo