Flashing Text in GS
Dear All,
Ive seen flashing text, Ive tried putting a timer and an change attribute>alpha Behaviour but it doesn't work, Does anyone have any idea how i could do this?
_______________________
My second question instead of just changing the alpha is there any transition that i could make that would make text flash in...??
Any help is appreciated,
Thanks,
Jack
Ive seen flashing text, Ive tried putting a timer and an change attribute>alpha Behaviour but it doesn't work, Does anyone have any idea how i could do this?
_______________________
My second question instead of just changing the alpha is there any transition that i could make that would make text flash in...??
Any help is appreciated,
Thanks,
Jack
Comments
then have a timer every 1 second (or however long you want the flash duration to be)
change attribute FlashText to (FlashText+1)%2
then have a rule when attribute FlashText=1
change attribute self color alpha to 0
then in the otherwise section of that rule put another change attribute behavior and change the alpha to 1
see if you like that
cheers
the xbox is overheating every 2 minutes for some reason so i got nothing else to do on this saturday now. im going threw cod withdrawls!
Thanks very much help is very much appreciated!
@Johnpapiomitis
On the coffee i see!
@Tshirtbooth Games on the mac are the best!
Make a boolean (unchecked) called Flashing.
Rule
When Flashing is false
Timer after ---set your flash time ---
Change attribute Flashing to true
Change attribute self.Alpha to 0
Rule
When Flashing is true
Timer after ---set your flash time ---
Change attribute Flashing to false
Change attribute self.Alpha to 1
hope that helps out. :-)
Edit: beaten to it by an army of people... !
----------------------------------------------
http://davidgriffinapps.co.uk/
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
They beet you too it!! Thanks for the help anyway its much appreciated!
"My second question instead of just changing the alpha is there any transition that i could make that would make text flash in...??
Any help is appreciated,"
Nice one, Tynan; providing there aren't too many other "Every" timers this is poifect!!
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Do having too many 'Every' timers slow GS up ? Or do they screw stuff up some other way (like throwing out the timers sync) ?
yeah too many timers can slow it down
Also nice one with the 1-, i personally use modulo as i posted above, becuase its a really nice habit to get into for making toggles, switching states, and whatnot, but good one non the less
cheers
"yeah too many timers can slow it down"
Cheers, good information to know !
Can you reduce this specific application to a more general principle?
yep its %2 because that will switch it between 2 states, 0 and 1. If you had %3 it would go 0,1,2 then back to 0, if you had it %4 it would go 0,1,2,3 then back to 0.
Hope that helps
"For instance changing the color of the text between red, green, and blue?"
How would you use the numbers 1, 2 and 3 for changing the color of the text between red, green, and blue ?
The only way I can think of is to change the RGB channels independently - or are you simply referring to swapping images or something like that ?
You would have your attribute called setColor or whatever you want to call it. Change the attribute to (setColor+1)%3 to toggle threw 0,1,and 2 then back to 0.
Then have rules when setColor=0
change attribute self color red to 1, change attribute self color green to 0, change attribute self color blue to 0 (that will make it red
when setColor=1
change attribute self color red to 0, change attribute self color green to 1, change attribute self color blue to 0 (that will change it to green)
when setColor=2
change attribute self color red to 0, change attribute self color green to 0, change attribute self color blue to 1 (that will change it to blue)
Cheers John, yeah I know all the colour stuff (although I not thought of doing via a (XXXX) % X rule).
What I would really like to do is to be able to generate a random number between 0 and 1 (0.056 for example) that I could use to change one of the colour channels - (rather than just 0 and 1)
?
I suppose I just need to generate a larger random number (let's say 1-100) and then divide by 100 ?
Sometimes you just need to type out stuff and it helps . .
someone should do a series of tutorials on how to use all the functions.