|
rui Beginner
Joined: 15 Aug 2002 Posts: 29 Location: Portugal
|
Posted: Tue Sep 10, 2002 1:31 pm
Need help with trigger |
I need a trigger that will make the mapper follow my location whenever I'm following someone. The display is like this:
XXX goes north
You follow XXX
How do I make the mapper move north?
thx
Rui |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Sep 10, 2002 2:10 pm |
#VAR leader {XXX}
#TR {@leader goes (%w)$You follow @leader} {#MAP %1}
LightBulb
Senior Member |
|
|
|
rui Beginner
Joined: 15 Aug 2002 Posts: 29 Location: Portugal
|
Posted: Tue Sep 10, 2002 2:42 pm |
If I understand it correctly, this makes the person's name hardcoded, so that the trigger will only work for following that person. Can it be made generic, like the direction?
Rui |
|
|
|
doomfyre Apprentice
Joined: 03 Jan 2002 Posts: 152 Location: USA
|
Posted: Tue Sep 10, 2002 3:47 pm |
How about making an alias so that whenever you join a person's group, it sets their name to the leader variable? On my mud, the command to join a person's group is follow <person>.
#alias follow {follow %1; #var leader %1}
Now, whenever you change groups, that leader variable will update automatically. |
|
|
|
rui Beginner
Joined: 15 Aug 2002 Posts: 29 Location: Portugal
|
Posted: Tue Sep 10, 2002 3:59 pm |
sounds good :)
I'll try it out
thx a lot
Rui |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Sep 10, 2002 6:17 pm |
No, it's not hard-coded to one person. I used a variable, @leader. Anytime you want to follow someone else, just change the variable. That's why I used it.
By the way, you'll have severe recursion problems (you'll lock up your computer) with that alias unless you change it to:
#AL follow {~follow %1; #VAR leader %1}
LightBulb
Senior Member |
|
|
|
|
|