|
Solaras Wanderer
Joined: 11 Mar 2002 Posts: 93
|
Posted: Thu Oct 04, 2007 6:09 am
[2.04] Trigger Loop |
This is the XML Script.
<?xml version="1.0" encoding="UTF-8" ?>
- <cmud>
- <trigger name="card_eq" priority="1550" stop="true">
<pattern>You have successfully inscribed the image of * on your Tarot card.</pattern>
<value>#add card_amount -1 ind @image #if (@card_amount != 0) {outd blank;inscribe blank with @image} {#t- card_eq trigger} i_info @card_amount @image left to inscribe.</value>
</trigger>
</cmud>
This is what happens when that trigger fires.
ind wheel
outd blank
inscribe blank with wheel
[Cerberus]: 9 wheel left to inscribe.
You are not holding such a card.
H:3519/3519 M:0/5306 WP:6305/23020 NL:56/100 exdb-
ind wheel
outd blank
inscribe blank with wheel
[Cerberus]: 8 wheel left to inscribe.
None of your decks contain a card with the image of nothing.
H:3519/3519 M:0/5306 WP:6105/23020 NL:56/100 exdb-
ind wheel
outd blank
inscribe blank with wheel
[Cerberus]: 7 wheel left to inscribe.
You lack the mental resources to etch a Tarot card.
H:3519/3519 M:0/5306 WP:6105/23020 NL:56/100 exdb-
ind wheel
outd blank
inscribe blank with wheel
[Cerberus]: 6 wheel left to inscribe.
You are not holding such a card.
H:3519/3519 M:0/5306 WP:5905/23020 NL:56/100 exdb-
ind wheel
outd blank
inscribe blank with wheel
[Cerberus]: 5 wheel left to inscribe.
None of your decks contain a card with the image of nothing.
H:3519/3519 M:0/5306 WP:5905/23020 NL:56/100 exdb-
and so on down to 0 when it finally turns the trigger off.
It seems to fire the trigger for each amount reduced in the #add.
So if I saw 'draw 100 wheel'
that trigger will keep firing until card_amount = 0 |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: Thu Oct 04, 2007 3:26 pm |
I noticed something a little similar when I was testing something else but I put it down to the strange thing that I was doing. I had a prompt trigger with a SUB and an ECHO or SAY in it that would consistently fire repeatedly on the same prompt about 20 times. I solved it by turning off trigger on trigger, and then when I had finished testing, by removing the ECHO or SAY (and turning trigger on trigger back on). I didn't test to see what the behaviour was on previous versions of CMUD for comparison.
I'm a bit unclear when trigger on trigger should be switched off though... (I know it was best less on on zMUD.) |
|
|
|
|
|