 |
neferpea Newbie
Joined: 05 Aug 2005 Posts: 6
|
Posted: Wed Sep 13, 2006 4:42 pm
following and the map? |
On my mud when I'm following someone it will say "You follow suchandsuch west." Now is there a way I can set it up so that the map will follow along too? Thanks for the help!!!
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Sep 13, 2006 10:01 pm |
Use a #trigger matching the above line, and have it #MOVE you in the appropriate direction.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Thu Sep 14, 2006 1:39 pm |
#trigger {You follow %w (%w).} {#move %1}
|
|
|
 |
neferpea Newbie
Joined: 05 Aug 2005 Posts: 6
|
Posted: Thu Sep 14, 2006 7:54 pm |
Beautiful!! Thank you so very very much!!! :)
|
|
|
 |
qwst_dxhans5 Newbie
Joined: 16 Sep 2006 Posts: 1
|
Posted: Sat Sep 16, 2006 1:58 am |
Take this one step further...I have an output on my MUD as follows:
JimBob leaves west.
You follow JimBob.
I have tried to set the trigger to go off on line 1, however, it will trigger anyone that leaves the room whether I'm following them or not. I have set the trigger to go off on line 2, however, it doesn't know what directly to go on.
I'm thinking that this would work (this trigger will go off when I originally begin to follow someone), however I"m at work and not able to try it:
#trigger {You begin to follow (*).} {#va leader %1}
#trigger {(*) leaves (*).} {#if %1=@leader} {#move %2}
What's the best way of setting this up? |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Sep 16, 2006 2:48 am |
Multi-state trigger.
#trigger {(%w) leaves ({north|west|south|east}).} {}
#condition {You follow %w.} {#if ("%t1" = @leader) {#move %t2} {#noop not the leader}} {withinlines|param=1}
%t1...%t99 = all the captured pattern pieces from all the states of the trigger. If the %w in the #CONDITION were surrounded in parentheses, you could refer to it as %1 or %t3, for example. |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
neferpea Newbie
Joined: 05 Aug 2005 Posts: 6
|
Posted: Fri Sep 22, 2006 7:26 pm |
Quote: |
#trigger {You follow %w (%w).} {#move %1} |
This worked wonderful until I was following something that have more than one word to its name, such as 'You follow the ugly man east.' Any ideas on how to fix this? Thank you :) |
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Sep 22, 2006 8:14 pm |
hrmm
#var followdirections {north|south|east|west}
#trigger {You follow %* (%w).} {#if (%ismember(%1,@followdirections))} {#move %1}
try that?
if you got diagonals like NE/northeast or something add that to the followdirections var.
of course this will break for special exits like out, enter, etc... |
|
|
 |
neferpea Newbie
Joined: 05 Aug 2005 Posts: 6
|
Posted: Sun Sep 24, 2006 6:34 pm |
Quote: |
hrmm
#var followdirections {north|south|east|west}
#trigger {You follow %* (%w).} {#if (%ismember(%1,@followdirections))} {#move %1}
try that?
if you got diagonals like NE/northeast or something add that to the followdirections var.
of course this will break for special exits like out, enter, etc...
|
Got it! Thanks again!! :) |
|
|
 |
|
|