|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Thu Sep 18, 2008 8:04 pm
regex question |
Ok, starting to feel like I live here as much as I pop in. Anyways, here's my problem. I'm trying to make my trigger highlight a variable different colors depending on the situation. Here's what I have.
\b@target\b
#IF (@rebounding = 0 AND @shield = 0) {#CW green,black}
#IF (@rebounding = 1 AND @shield = 0) {#CW red, black}
#IF (@rebounding = 0 AND @shield = 1) {#CW yellow, black}
#IF (@rebounding = 1 AND @shield = 1) {#CW blue, black}
Thanks for all the help, sorry to keep bugging you guys so much. Me and the others helping me are being driven crazy as to why this won't work. Line one does work, but the last 3 don't. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Sep 18, 2008 9:04 pm |
Try this
Code: |
#CW %case(%eval(@rebounding+@shield+1),"green.black",%if(@shield,"yellow,black","red,black"),"blue,black") |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Fri Sep 19, 2008 12:11 am didn't work |
well, i tried it but it completely blacked out the name of the target
I stand corrected, it didn't work for the very first part that was supposed to be green. Otherwise, it works fine. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 19, 2008 12:25 am |
Typo on my part. I have "green.black" when it should be "green,black".
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
kazu Beginner
Joined: 16 Sep 2008 Posts: 17
|
Posted: Fri Sep 19, 2008 12:58 am |
Works perfectly, thanks!
|
|
|
|
ralgith Sorcerer
Joined: 13 Jan 2006 Posts: 715
|
Posted: Fri Sep 19, 2008 1:53 am |
If you think you live here, look at Vij ;)
But he *is* a genius :P |
|
_________________ CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate |
|
|
|
|
|