Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Thu Dec 24, 2009 1:37 pm   

Trigger option for Repeat Within Line
 
Anyone able to explain how to use the Repeat Within Line option? I'm unable to get it to work. It only matches the first occurance.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Dec 24, 2009 6:09 pm   
 
I dunno if it's bugged in the public version, but let's say that your game lists the WHO list in a comma-delimited list format:

Tom, Dick, Harry

and that you want to highlight your friends' names. Normally, a pattern only matches once per line, so if you have more than one friend on a line then anyone beyond the first won't get highlighted. That's what this option is for, it (recursively?) parses the pattern until all matches are found and processed.

#trigger "friends" {{Tom|Harry}} {#cw green} dunno where the option for repeat within line goes, but make it checked
_________________
EDIT: I didn't like my old signature
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 26, 2009 12:38 am   
 
Well that is what I thought. I'm actually on 3.12 but it is not working. It was only matching the first occurance of the pattern. The actual line is a comma delimited line of inventory. I just wanted to make sure I was using it correctly.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 26, 2009 12:49 am   
 
oldguy2 wrote:
Well that is what I thought. I'm actually on 3.12 but it is not working. It was only matching the first occurance of the pattern. The actual line is a comma delimited line of inventory. I just wanted to make sure I was using it correctly.


Okay I figured out the problem. It works but it won't work in a multistate trigger. I have a multistate trigger and the second state is the pattern I want to repeat within line. I have it set to within lines 1. It will only match the first occurance and stop. If I just make a plain trigger and set the option to repeat within line it works fine. Except I don't want to have to constantly enable disable it and a multistate trigger would be much easier.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sat Dec 26, 2009 5:53 am   
 
Confirmed.

Not all trigger-state types are compatible with multi-state triggering, though, so this could very well be a case where certain trigger options like Repeat Within Line also intentionally do not work in multi-state triggering. We'll see what Zugg says when he comes back.

In the meantime, go ahead and put in a Feedback ticket about the issue. Be sure to be descriptive and include both a specific example of what you're trying to do and a link/reference to this thread.
_________________
EDIT: I didn't like my old signature
Reply with quote
Taz
GURU


Joined: 28 Sep 2000
Posts: 1395
Location: United Kingdom

PostPosted: Tue Dec 29, 2009 1:53 pm   
 
I remember Zugg already saying that particular option only works on #TRIG and not on #COND.
_________________
Taz :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 04, 2010 6:05 pm   
 
That is correct...it won't work with trigger states.

Also keep in mind that both the #CW and #SUB commands already internally loop through multiple matches in a line so you don't need to add the Repeat Within Line options to those trigger commands.
Reply with quote
foxmeep
Newbie


Joined: 15 Jan 2010
Posts: 1

PostPosted: Fri Jan 15, 2010 2:45 am   
 
is this option possible in ZMUD 7.21?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net