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
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Mon Nov 12, 2012 4:01 pm   

#cond Trigger
 
I'm working on a trigger to capture the Mob Names from the current room I am in when scanning.

The problem is the second condition never fires untill the Number of Loops from the First loop finish.
How do I break out of the first condition before the number of loops finish?

Thank you


CMD>scan
Right here you see:
- A black ant
- A flea beetle
North from here you see:
- A scraggly weed
South from here you see:
- A flea beetle


Seems easy enough:
Code:

<trigger name="ScanTrigger" priority="30" id="3">
  <pattern>^Right here you see:$</pattern>
  <value>#Noop</value>
 
 <trigger type="Loop Pattern" param="99">
    <pattern>^%s-%s{a |an |the |some }(*)$</pattern>
    <value>#CAP Mobs %1</value>
  </trigger>

  <trigger>
    <pattern>^* from here you see:$</pattern>
    <value>#STATE ScanTrigger 0</value>
  </trigger>
</trigger>

Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Nov 12, 2012 4:18 pm   
 
i would use separate triggers myself
have the first state turn on th second state (now a separate named trigger)
and the third state would turn it back off, no need to have it loop lines
_________________
Discord: Shalimarwildcat
Reply with quote
Tanuki
Novice


Joined: 06 Nov 2008
Posts: 38

PostPosted: Mon Nov 12, 2012 4:31 pm   
 
So you would use the #T+ and the #T-?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Nov 12, 2012 7:07 pm   
 
correct
_________________
Discord: Shalimarwildcat
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Mon Nov 12, 2012 9:43 pm   
 
It looks like you're only trying to capture the mobs in the current room. Is your goal to eventually make a full scan capture that triggers on all directions? If you only want to capture the current room, you could just use 'scan here' instead of just 'scan', then you wouldn't need the third state at all.
Code:
<trigger name="ScanTrigger" priority="30">
  <pattern>^Right here you see:$</pattern>
  <trigger type="Within Lines" param="1">
    <pattern>^%s-%s{a |an |the |some }(*)$</pattern>
    <value>#CAP Mobs %1
#STATE 1</value>
  </trigger>
</trigger>
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