GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to set a rule to change Text color/transparency?

ElectroFoxElectroFox Posts: 22Member, PRO

Hi folks. I did some search around and yet couldn't find the solution for this. Ok heres the thing:

Assume I have a game attribute integer called "Coolness" which displays numbers. When another actor is pressed, i want to change the Coolness display to another color/transparency.

So I made game attribute called NewColor, and if the other actor is pressed NewColor = 1
If NewColor = 1, change attribute of Coolness to a color & transparency of my choice. How or where is the option/formula to change color? Thanks.

Best Answer

Answers

  • AJaymzAJaymz Posts: 164Member, PRO

    @ElectroFox You have to just put a Display Text behavior under each attribute number:

    -When NewColor = 1
    Display Text (choose a color)
    ELSE:
    -When NewColor = 2
    Display Text (choose another color)
    ELSE:
    -When NewColor = 3
    Display Text (choose another color)

  • ElectroFoxElectroFox Posts: 22Member, PRO
    edited March 2015

    @AJaymz Alright I get the point, but theres still problem when I put a Display Text behavior for it.

    As said, the "Coolness" is an integer attribute displaying number. Lets say it is 10, i've added a plain text before it saying Coolness Score, the whole actor shows this:

    s4.postimg.org/4238hgri5/Captured1.jpg

    When I added the Display Text behaviors, (i want only the number 10 to change to red), but the result is the 10 came on top in the middle of the whole actor:

    s17.postimg.org/3sd8p0x4v/Captured2.jpg

    Probably i'm doing something wrong, please help. Appreciate it.

  • ElectroFoxElectroFox Posts: 22Member, PRO

    Alright then, i guess thats the best way to do it. Thanks.

Sign In or Register to comment.