Change color of text at random using a timer --- please help!!!

I need an easy way to say
"every 1 second"
---change Display Text color to a random color

Comments

  • -Timo--Timo- Member Posts: 2,313
    the color his min is 0 and his max is 1
    so say
    every 1 sec do:
    change self.color.green to random(0,1)
    change self.color.red to random(0,1)
    change self.color.blue to random(0,1)
    but this is with an actor and not with the display text...
    I don't think this is possible with display text so I think you have to make an white text image and import this to the actor.
    hope this helped :)
    good luck!
  • katslumpkatslump PRO Posts: 31
    See that is the problem...the text is spitting out random words and the words need to be different colors.
    I have tried your way with the actor; however it doesn't work.
    I originally had the Opacity at 0 for the actor (so the background of the text wouldn't be white) so I thought that might have been the problem. However, even after I changed the opacity nothing seemed to happen.
    Hmm.
  • SocksSocks London, UK.Member Posts: 12,822
    Create your text externally (eg: Photoshop) as white text on a transparent background.


    Timer / Every 1 second:
    Change Attribute self.color.Red to: random(1,255)/255
    Change Attribute self.color.Green to: random(1,255)/255
    Change Attribute self.color.Blue to: random(1,255)/255

  • SocksSocks London, UK.Member Posts: 12,822
    Example project (attached):

  • katslumpkatslump PRO Posts: 31
    Okay so there is no way for me to keep my text as it and just change its color?
  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2013
    Okay so there is no way for me to keep my text as it and just change its color?
    @katslump

    You can (depending on how your project is set up) apply the colour over your GameSalad generated text using a transfer mode.

    (example attached):

  • katslumpkatslump PRO Posts: 31
    THANK YOU! Thats what I needed
  • SocksSocks London, UK.Member Posts: 12,822
    THANK YOU! Thats what I needed
    No problem, glad it works for you. :)>-
Sign In or Register to comment.