<font color="ValidHTMLColor">Your Text</font>
SetForegroundColour ("ValidHTMLColor")SetBackgroundColour ("ValidHTMLColor")What message does it kick back in the switch script? Or does it just print black?
Code: Select all
<font color="ValidHTMLColor">Your Text</font>
If you want to change text color for the entire game:
Code: Select all
SetForegroundColour ("ValidHTMLColor")
If you want to change background color for the entire game:
Code: Select all
SetBackgroundColour ("ValidHTMLColor")
Valid HTML colors. You can also use Hexadecimal color (#RRGGBB).
Neonayon wrote:What message does it kick back in the switch script? Or does it just print black?
It pretty much destroys all the coding in that particular section xD meaning none of it works at all. Every error code goes off in any particular part I use... <font color = "blue">Blah Blah</font> this in. It DOES work for plain text boxes, and probably normal scripts as well. But for "Switch/If's" it's a big no. Unless it might be because I have a Function inside of them.
If you want to put color into your messages/strings:
[quote]
Code: Select all
<font color="ValidHTMLColor">Your Text</font>
If you want to change text color for the entire game:
Code: Select all
SetForegroundColour ("ValidHTMLColor")
If you want to change background color for the entire game:
Code: Select all
SetBackgroundColour ("ValidHTMLColor")
Valid HTML colors. You can also use Hexadecimal color (#RRGGBB).
string = "<font color=\"ValidHTMLColor\">Text Here</font>"string = "<font color="ValidHTMLColor">Text Here</font>"string = "<font color=\"" +CharacterColorString+ "\">Text Here</font>[/code
If this doesn't solve your question, you should post the block of code giving you trouble.
<function name="somefunc">
<![CDATA[
msg ("<font color=\"red\">Hello world</font>")
]]>
</function><span class="Jimmy">What the heck is going on here?</span>
<span class="Mary">I don't know, but I think we should get a move on!</span>jaynabonne wrote:If you want to have things like "<" and ">" in strings while in code view you need to enclose the script body in a CDATA block. Otherwise, the XML parser tries to interpret what's inside your strings as part of the outer XML markup.
A simple example:<function name="somefunc">
<![CDATA[
msg ("<font color=\"red\">Hello world</font>")
]]>
</function>
If you don't have the <!CDATA[ ... ]]> enclosing your script, you will get errors!
You should be able to use markup in your strings wherever you want (any sort of switch/if/whatever script) if you've escaped it properly.
jaynabonne wrote:A minor note: the "font" tag is considered deprecated and won't be supported in HTML5. You might be better off in the long run using a class for each character and then setting the class attributes in CSS rather than spreading the color info all through your strings:<span class="Jimmy">What the heck is going on here?</span>
<span class="Mary">I don't know, but I think we should get a move on!</span>
That way, if you decide to change the color (or any other part of the styling), you can change it in one place rather than every string in the game.