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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Mon Dec 19, 2005 9:12 am   

Simple multi-state trigger question
 
Okay, so I'm trying to fix up some triggers to move me around on the map when I follow someone in my group. So if Quarren is the leader:

Quarren leaves east.
You follow Quarren.

What throws this off a little bit is that sometimes, if there are several people in the group, one of the others will follow him first, leaving me with something like this:

Quarren leaves east.
Haksu leaves east.
You follow Quarren.

Based on the documentation I figure the best way to do this is with a multi-state trigger, but I've never done anything with them before and I can't make the thing work. Any ideas?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Mon Dec 19, 2005 1:09 pm   
 
Try this...

Code:

#VAR Leader "Quarren"
#TR { @Leader least &%w{MapDir} } { }
#COND { You follow @Leader} { #MOVE @MapDir }
_________________
Asati di tempari!
Reply with quote
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Tue Dec 20, 2005 2:39 am   
 
Hrm, it will work, but not when I'm blind or don't have a light. In that case I get this:

Someone leaves east.
You follow someone.

What I was thinking was a trigger that would fire on: "%w leaves %w." and then switches to a state that fires on "You follow %1" to #move %2 ? I tried to do this but it just crashes zmud.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Dec 20, 2005 3:28 am   
 
#TR {{@Leader|Someone} least &%w{MapDir} } { }
#COND {You follow {@Leader|someone}} { #MOVE @MapDir }

Try that.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Dec 20, 2005 4:34 am   
 
Thanks Ton... although I think you mean 'leaves' instead of 'least' but I'm malathion gets what you mean.

Curious on many other MUDs of played you can't follow someone if you're blind. (And it makes RP sense too... but whatever Very Happy )
_________________
Asati di tempari!
Reply with quote
Taz
GURU


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

PostPosted: Tue Dec 20, 2005 3:25 pm   
 
Perhaps on that mud you are tied to the leader by a rope Rolling Eyes
_________________
Taz :)
Reply with quote
malathion
Beginner


Joined: 23 Jul 2004
Posts: 20

PostPosted: Wed Dec 21, 2005 2:55 pm   
 
That did it, thanks!
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Dec 22, 2005 5:49 pm   
 
Tech wrote:
Try this...
Code:
#VAR Leader "Quarren"
#TR { @Leader least &%w{MapDir} } { }
#COND { You follow @Leader} { #MOVE @MapDir }
Tech wrote:
Thanks Ton... although I think you mean 'leaves' instead of 'least' but I'm malathion gets what you mean.
Tech, ya shouldn't correct someone when you made the same error as well ;-)
_________________
http://www.Aardwolf.com
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Fri Dec 23, 2005 12:10 am   
 
Its all good that results in an answered question.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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