|
malathion Beginner
Joined: 23 Jul 2004 Posts: 20
|
Posted: 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? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
malathion Beginner
Joined: 23 Jul 2004 Posts: 20
|
Posted: 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. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Dec 20, 2005 3:28 am |
#TR {{@Leader|Someone} least &%w{MapDir} } { }
#COND {You follow {@Leader|someone}} { #MOVE @MapDir }
Try that. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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 ) |
|
_________________ Asati di tempari! |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Tue Dec 20, 2005 3:25 pm |
Perhaps on that mud you are tied to the leader by a rope
|
|
_________________ Taz :) |
|
|
|
malathion Beginner
Joined: 23 Jul 2004 Posts: 20
|
Posted: Wed Dec 21, 2005 2:55 pm |
That did it, thanks!
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: 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 ;-) |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Dec 23, 2005 12:10 am |
Its all good that results in an answered question.
|
|
|
|
|
|