Hi everyone,
I'm sure this has been asked before, but I failed to find it while searching.
As my name suggests, I need this explained really simply. (Let's call it a mild case of dyscalculia) It took me a year and several posts on the forums to get my zmud triggers set up. So, this is kind of daunting for me.
I can set up a simple color trigger in mudlet. It's been idiot proofed. My issue is that it will only highlight the words used to make the pattern.
For instance I might use green to know when I'm being hit. I set up a trigger with the words "hit's you" in the pattern.
Now the mud does this:
So and so hits you causing you to reel from the damage.
Great.
But how do I set up the mud to trigger on the phrase "hits you" and get it to do this:
So and so hits you, causing you to reel from the damage?
Color Trigger Question
Re: Color Trigger Question
By default, it will only highlight the part it matches.
adding this to the trigger's script should help you out:
adding this to the trigger's script should help you out:
What this does is select the line the trigger has matched on, sets the foreground (or text) color to green, then clears the selection and resets format so your next triggers/lines come out looking as intended and you don't accidentally bleed into other text.
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: Color Trigger Question
Thank you. I'm gonna test it out and hopefully I'll do it right.
Re: Color Trigger Question
You should be able to just copy and paste what I put into the big white box beneath the trigger patterns and then save it =)
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: Color Trigger Question
Something is wrong. I thought, I'll never be able to describe it. So, I took a screen shot.
Also, can you use custom colors for highlights?
Also, can you use custom colors for highlights?
Re: Color Trigger Question
That does look like a bit of a display issue... did that happen from the copy/paste? If you click the button on the left in that screenshot which says "Errors" then it'll bring up an error console where you can see any lua scripts which have gone sideways.
As for custom colors, well sure... for this method, you have the following options:
you can use bg("purple") in the same manner as fg("green") and replace the colors with whatever you wish from that chart.
There's further customization possible, but requires that you feed in your own RGB values, and I'm not sure if that's what you're looking for? If it is, you may want to look at setFgColor() and setBgColor()
As for custom colors, well sure... for this method, you have the following options:
you can use bg("purple") in the same manner as fg("green") and replace the colors with whatever you wish from that chart.
There's further customization possible, but requires that you feed in your own RGB values, and I'm not sure if that's what you're looking for? If it is, you may want to look at setFgColor() and setBgColor()
Re: Color Trigger Question
Also, if you wanted to, you can add your own color names to the color table, so you can use them that way. Like so:
color_table["my_color"] = {100,100,100} -- those are R G B color values respectively.
color_table["my_color"] = {100,100,100} -- those are R G B color values respectively.
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: Color Trigger Question
Awesome tips on the custom colors. Still struggling with the full lines. But as promised, I have a bit of trouble processing. I'm not making some obvious connection. But... I don't know what it is, because, I'm not making that connection.
I wish there were an easy way to just import cmud settings and have it sort of imitate cmud. (Which may defeat the point as of course cmud imitates cmud very nicely. But since cmud is not really supported anymore and computers are changing I thought I should get ahead of the curve.)
I wish there were an easy way to just import cmud settings and have it sort of imitate cmud. (Which may defeat the point as of course cmud imitates cmud very nicely. But since cmud is not really supported anymore and computers are changing I thought I should get ahead of the curve.)
-
- Posts: 6
- Joined: Thu Jun 12, 2014 11:15 pm
Re: Color Trigger Question
It should work fine. Try ticking off the highlight in the trigger.
-
- Posts: 21
- Joined: Tue Jun 17, 2014 10:17 pm
Re: Color Trigger Question
Bingo! Thank you!