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

ElectroFoxElectroFox Member, PRO Posts: 22

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

  • AJaymzAJaymz Posts: 164
    Accepted Answer

    @ElectroFox You'll have to make 2 Display Texts. One for "Coolness Score" and one for the Coolness integer. Just play around with the placements.

Answers

  • AJaymzAJaymz Member, PRO Posts: 164

    @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 Member, PRO Posts: 22
    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 Member, PRO Posts: 22

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

Sign In or Register to comment.