Changing the text color of one word, in 1 actor

Non-platform specific questions.

Changing the text color of one word, in 1 actor

Postby Hblade » Sun Jul 26, 2009 9:52 pm

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?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

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

Postby skydereign » Sun Jul 26, 2009 10:06 pm

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

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

Postby Hblade » Sun Jul 26, 2009 10:25 pm

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
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

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

Postby pyrometal » Mon Jul 27, 2009 12:29 am

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!
SPRITE WARRIOR:
Free, open-source & crossplatform pixel art editor (currently under construction).
User avatar
pyrometal
 
Posts: 706
Joined: Wed Nov 28, 2007 4:07 am
Location: Kingston, ON, Canada
Score: 86 Give a positive score

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

Postby jimmynewguy » Mon Jul 27, 2009 2:41 am

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.
Working on a probably too ambitious project! Wild-west-adventure-RPG-shooter-thing.
User avatar
jimmynewguy
 
Posts: 1137
Joined: Sat Mar 31, 2007 6:27 pm
Score: 89 Give a positive score

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

Postby DST » Mon Jul 27, 2009 4:10 am

You can make a String variable or an Array of Strings and save and load them like any other variable.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron