|
VgWizard14 Beginner
Joined: 30 Nov 2008 Posts: 14
|
Posted: Sat May 02, 2009 1:02 pm
A problem with #PSUB |
Let me begin with the output.
Quote: |
The tall, muscular man leans back against a carven, baobab couch, resting his arms against the rim as the tall, muscular man crosses his legs at the ankles.
The lean, voluptuous woman looks at the tall, muscular man, grinning as she slowly crooks a finger, beckoning the tall, muscular man to her side.
|
These are just two examples. What I want the code to do is this:
Quote: |
The tall, muscular man(Amos) leans back against a carven, baobab couch, resting his arms against the rim as the tall, muscular man(Amos) crosses his legs at the ankles.
The lean, voluptuous woman(Cathy) looks at the tall, muscular man(Amos), grinning as she slowly crooks a finger, beckoning the tall, muscular man(Amos) to her side.
|
Essentially, I need a trigger that replaces the character description with a colored version, appending the name to the end.
tall, muscular man becomes "tall, muscular man(Amos)" in blue, etc..
Here is the script I have so far.
Code: |
#TRIGGER (tall, muscular man)(?)
#PSUB "%1(Amos) " %x1;#CW cyan;
|
It works perfectly IF it is the only character in the line. Otherwise, it screws up. Here is a similiar recreation:
Quote: |
#TRIGGER (carven, baobab couch)(?)
#PSUB "%1(It's made of wood) " %x1;#CW cyan;
#TRIGGER (simple tile-topped table)(?)
#PSUB "%1(There is tile on it) " %x1;#CW cyan;
------
The tall, muscular man shifts his eyes between a carven, baobab couch(It's msimple tile-topped table(There is tile on it) le tile-topped table, looking at the contents on a simple tile-topped table before returning his view to a carven, baobab couch.
--
Supposed to be:
The tall, muscular man shifts his eyes between a carven, baobab couch(It's made of wood) and a simple tile-topped table(There is tile on it), looking at the contents on a simple tile-topped table(There is tile on it) before returning his gaze to a carven, baobab couch(It's made of wood)
|
The only idea I have is that the trigger might be reading from the unedited line, then adding all the PSUBs at once.
Maybe you can help? I'll give you kudos if you do! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sat May 02, 2009 2:00 pm |
You shouldn't need to use #psub for this, #sub should be fine.
#trig {tall, muscular man} {#sub {<color blue>tall, muscular man</color> (Amos)}}
should be all you need. |
|
|
|
VgWizard14 Beginner
Joined: 30 Nov 2008 Posts: 14
|
Posted: Sat May 02, 2009 2:50 pm |
The above didn't work exactly how I wanted it, but -this- does:
Quote: |
#TRIGGER {(tall, muscular man)}
#SUB { <color teal>%param1 </color>(Amos, lord and master of all)}
|
Thanks much, Fang! Now I just have the database problem to work on, detailed in another post -_- |
|
|
|
Leyline Wanderer
Joined: 03 Feb 2007 Posts: 64
|
Posted: Mon May 04, 2009 2:31 am |
is this <color blue> a zmud or cmud thing?
I was using %ansi(black,bold) .... %ansi(reset) |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon May 04, 2009 9:51 am |
Both; it's MXP.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|