Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Changing the color of text for in-game speech

Ok, this is my second tutorial. Now then, have you ever had a word or name in a game you've been developing that you think would be really important to the storyline? I recommend this tutorial for such a situation, or you can juat use it to spice up your game in general. It's very simple, actually.

All you do is start typing a message of in-game text, and then, when you come to a word that you think you should point out to whoever will play the game, or just want to season up the message a bit, type \c[#] before the word(s) you want to change the color of. The following is a key for what each number does.

0=white (used to return the text to normal)
1=purple
2=red
3=green
4=blue
5=pink
6=yellow
7=gray
8 and up=nothing

That's all there is to it! Like I said, it's simple.
 

Injury

Awesome Bro

i/e you have to do the following for this sentence.

\c[3] The \c[0]((White/default))quick \c[2((red))]brown fox got killed.\c[0]((back to white))

\c[1]
\c[2]
\c[3]

these are the things you use.
 
devonm0, update first post with more information such as how to change it back halfway through or how to edit the values in the script editor.
 

Hyde

Member

Well on my game each character has a color for their name.
So lets say you wanted to write "Hello Jack and Jill how are you?" but with color with the names here is how it is done.

"Hello \c[6]Jack \c[0]and \c[2]Jill\c[0] how are you?"
And the ending result is, "Hello Jack and Jill how are you?" (Black text = white in game text.)

So in simple terms once you want the text to return to white insert "\c[0]" 1 letter space before the text begins to display white
 
The only problem with these is if you use too many colors, you'll take up all the space on one line and have to use the next. That's what I hate about eventing text, you have a very limited amount of characters  :-\
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top