Controlling text character colours one by one

Get help using Construct 2

Post » Fri Sep 06, 2013 7:30 pm

I have an idea to have text on screen and be able to change the colour of each letter individually

It seems not possible using Sprite Font or Text unless I create one text for each character, which means to create a video memory engine of some sort, and I will loose the alignment and word wrap capabilities that the text objects give me...

Is there a better way to accomplish that?

Ta
B
4
S
1
Posts: 8
Reputation: 691

Post » Fri Sep 06, 2013 8:13 pm

Unfortunately no :T I'd love to be able to do this as well..
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Sat Sep 07, 2013 4:37 am

I've found this other thread with an example that does that word by word:

http://www.scirra.com/forum/different-text-colors-in-the-same-text-object_topic50140.html

I did few changes and could do it char by char based on an array of colours. It works fine, but I have no idea how to deal if my text is presented in more than one line (word wrap).

My version of the example:

https://www.dropbox.com/s/rd7pamibqfslqmh/TextColorByChar.capx

If anyone has an idea how to make the char instances follow the word wrap, I'd be glad!

Thanks


Paulo
B
4
S
1
Posts: 8
Reputation: 691


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 3 guests