|
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Sun Jul 15, 2007 7:24 pm
Changing the color of a line of text |
OK, I am going crazy. This is my first attempt at writing a script and I am trying to change the color of a line of text. I have read the forums and still cannot get a handle on what I need to do. Any help? Thanks all
#trigger {|1|.A black stallion prances about, being ridden by you.}{#cw red}
Below is where the text is coming from.
Waterfront Square
This small square is the heart of the waterfront in Falme. Business seems to be
proceeding as usual, yet everyone seems to be looking over their shoulder for
something. People walk briskly, occasionally nodding to one another by way of
greeting, but never stopping to talk. To the west are the main commercial
docks. Dock Road follows the waterfront north and south, and Water Street leads
into the business district to the east.
[ obvious exits: N E S W ]
A lantern has been left here.
A stout wooden barrel stands nearby.
The waters of a blue-veined marble fountain pour forth here.
A conscripted soldier now fights for the Seanchan.
A Seanchan fighter glares from behind dark eyes.
|1|.A black stallion prances about, being ridden by you.
|2|.A warhorse is here, stamping his feet impatiently.
The Deathwatch Guard has murder in his eyes.
The Deathwatch Guard has murder in his eyes. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jul 15, 2007 9:42 pm |
Ok, first of all, spacing is really important. There MUST be a space between the }{ or else ZMud just ignores the entire trigger. Second, ZMud uses the pipe to separate stringlists, so for purposes of your trigger pattern you may need to use the quote character (it's ~ by default).
#trigger {~|1~|.A black stallion prances about, being ridden by you.} {#cw red} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Sun Jul 15, 2007 10:11 pm |
Matt,
Thanks for the help. I did that and still do not have any change. Maybe I am in the wrong area for this script to work.
I am under triggers, give the script a nme and then pasted your text on line one. Saved it and "looked" at my text. There was no change. Am I doing this part wrong by chance? |
|
|
|
charneus Wizard
Joined: 19 Jun 2005 Posts: 1876 Location: California
|
Posted: Sun Jul 15, 2007 10:27 pm |
It's because you're using #CW. #CW is used for words. Use #CO instead. And make sure you don't have double instances of the trigger.
Charneus |
|
|
|
jallen0 Beginner
Joined: 10 May 2007 Posts: 11
|
Posted: Mon Jul 16, 2007 12:25 am |
OK so it now looks like this.
#trigger {A young Morat'torm carries out the orders of his superiors.} {#co red}
and it still doesn't work. Sorry for not understanding. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Jul 16, 2007 3:48 am |
The only difference between #CW and #COLOR is that #CW only colors the trigger pattern whereas #COLOR colors the entire line.
Quote: |
Am I doing this part wrong by chance?
|
Maybe, the code I gave was meant to be entered via the command line. If you're doing it via the Settings Editor, you'll have to pick out the appropriate text instead of pasting the entire #trigger {} stuff. Sounds like you got a handle on it, however.
Next up on the list of common issues is if the gun icon in the lower right has a big red X through it. Pressing CTRL-R does this, and when it has the X none of your triggers will fire at all.
You can also look at the individual trigger options, maybe something's not set right there. It looks like this trigger should be Trigger on Newline, pattern type, and with the Trigger on Trigger selected. These should all be getting set by default, though. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|