Page 1 of 1

Changing the text color of one word, in 1 actor

PostPosted: Sun Jul 26, 2009 9:52 pm
by Hblade
Ok, say I have this text,
Hi, hows it going, character name, how can I make it like this
Hi, hows it going, Character name?

Re: Changing the text color of one word, in 1 actor

PostPosted: Sun Jul 26, 2009 10:06 pm
by skydereign
You can't do this unless you are using a canvas as your text display. I think if you look up RPG dialog, you will find it, not sure though. text actors cannot change text color, except for the entire text, which is not what you want.

Re: Changing the text color of one word, in 1 actor

PostPosted: Sun Jul 26, 2009 10:25 pm
by Hblade
I seen the canvas thing, I liked it allot! but, it's way to complicated to use right now, because I dont feel like browsing through the code to find out how to do it.. hoever... if pyrometal will tell me how he did it :3

Re: Changing the text color of one word, in 1 actor

PostPosted: Mon Jul 27, 2009 12:29 am
by pyrometal
It's like Sky said, you need a canvas if you want everything to be in one actor... But you can also do this highlighting stuff with 2 text actors running in parallel with fancy formatting functions... One actor for normal color, and the other for highlights... I've done it before, so I know it's possible! Involves a bit of coding though (not as much as the canvas method) I might post a demo if you have enough interest!

Re: Changing the text color of one word, in 1 actor

PostPosted: Mon Jul 27, 2009 2:41 am
by jimmynewguy
ah this might be a little off topic, but it involves dialogues as well. I know you can save "text" variables (i forget the real name my bad) but I've always wondered how you call them back in text dialogue?

example since i suck at explaining things.....maybe the game is an old "ultima style" rpg and everything that happens is in a text at the bottom of the screen. If you attack something and do a variable's worth of damage how would you use like strcpy(info.text, "You did *dmg*"); where *dmg* is how much damage you did based on the variable.

Re: Changing the text color of one word, in 1 actor

PostPosted: Mon Jul 27, 2009 4:10 am
by DST
You can make a String variable or an Array of Strings and save and load them like any other variable.