How do I change the color of Spritefont?

Get help using Construct 2

Post » Mon Jan 19, 2015 7:39 pm

Hello everyone!

I just was wondering if there is a way to change the color of SpriteFont during the execution of the layout..

Any idea?
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Mon Jan 19, 2015 8:38 pm

I believe you have to use effects to do that. If you don't want to use effects then you would have to add different versions of the sprite font colored how you want them and switch between them if I'm not mistaken.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Mon Jan 19, 2015 8:58 pm

What type of effect? What's his name?
B
17
S
3
Posts: 62
Reputation: 1,054

Post » Mon Jan 19, 2015 9:01 pm

Like I said I've never done it. You would have to play around with them to find out what you like and what would work with your application. Off the top of my head I would think that the effect SetColor might be a good place to start.
B
60
S
20
G
56
Posts: 1,077
Reputation: 35,941

Post » Mon Jan 19, 2015 9:45 pm

Yes SetColor will do it but see my current thread about weird effects in the editor. AND it doesn't seem to really give the colours you specify... play with it and let me know what you think.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Mon Jan 19, 2015 10:51 pm

SetColor doesn't seem to work for me at all. I guess my preview doesn't webGL?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Tue Jan 20, 2015 4:09 pm

SetColor is just what I wanted! Thanks!

@codah I just needed the red and green, so I do not know if the the nuances of colors work, however, the change from green to red works.

@Unnatural20 Yes, I think this is your problem
B
17
S
3
Posts: 62
Reputation: 1,054


Return to How do I....?

Who is online

Users browsing this forum: Demkamen and 12 guests