 |
Tanuki Novice
Joined: 06 Nov 2008 Posts: 38
|
Posted: Mon Feb 23, 2015 11:32 am
Loop Pattern Grabs Last Line |
So I have built a trigger to capture characters in a room based on the Aardwolf {roomchars} {/roomchars} Tags. The trigger is based off the Inventory Loop Pattern example from the MultiState Trigger help doc. Problem is it always adds {/roomchars} to the end of RoomCharacters So I get...
The Hotel Administrator stands here, ordering people like you around.
{/roomchars}
I've played with No Trig and Priorities but can't seem to nail is down. What do I need to do to not capture the last line?
Thank you,
Tanuki
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<trigger name="RoomChars" priority="30" stop="true" copy="yes">
<pattern>^~{roomchars~}$</pattern>
<value>#VAR RoomCharacters ""
</value>
<trigger type="Loop Lines" param="100">
<pattern>^($Chars:*)$</pattern>
<value>#ADDITEM RoomCharacters $Chars
#TEMP {^~{/roomchars~}$} {#STATE RoomChars 0; #GAG}</value>
<arglist>$Chars</arglist>
</trigger>
</trigger>
</cmud> |
|
|
 |
shalimar GURU

Joined: 04 Aug 2002 Posts: 4769 Location: Pensacola, FL, USA
|
Posted: Mon Feb 23, 2015 12:22 pm |
Don't worry so much about the fact that it got captured.
That's a trivial concern in the long run.
Instead, work out a clean-up step to strip it out.
From what I am seeing.... a small change would fix this.
1. Make the temp trigger a full trigger, and toggle its enabled status with #T+ #T-.
2. Make the new trigger have a lower priority number, so it will fire before the other trigger, and check the 'stop further processing' option, this will prevent other triggers from firing on the same line.
That should prevent it from being captured in the first place. |
|
_________________ Discord: Shalimarwildcat |
|
|
 |
|
|
|
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
|
|