Colours in response text

The Pixie
05 Sept 2011, 21:19
Is it possible to change the colour of the text for the responses to take, drop, open and close?

I would be happy if this was done generically for all successful takes, etc., or to do it separately for each object. Specifically, I want to change the colour at the start of the text, and change it back at the end.

Alex
06 Sept 2011, 08:43
You can change the TakeSuccessful template to include a color tag:


"<color color=\"red\">You pick " + object.article + " up.</color>"

The Pixie
06 Sept 2011, 08:57
Okay, thanks. Is that a standard HTML tag? I tried to use <font color="red">, but that did not work.

Alex
06 Sept 2011, 09:02
You can't use HTML (except when using the "insert" command to insert HTML from a file). Instead, there is a limited set of XML you can use:

<b>, <i>, <u> - bold, italic, underline
<br/> - line break
<object verbs="Look at/Take/Use">name</object> - for printing an object hyperlink
<color color="red">text</color>
<font size="12">text</font>
<align align="left">text</align>
<a href="http://www.textadventures.co.uk">text</a>

Note that in the Editor, you should generally only use these within expressions. The rich text editor for object descriptions, for example, will strip these out or generally behave oddly (this is my excuse for not documenting these very well)

Pertex
06 Sept 2011, 13:16
Would it be possible to replace this tags by something like [ ] ( [object verbs="Look at/Take/Use"]name[/object]) and the player converts it to correct xml-tags? Then we could edit them in the editor and wouldnt need the <![CDATA[.