 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Sun Feb 29, 2004 3:48 pm
Mapping rooms with special exits |
I have a question about mapping rooms where you don't move in the standard way (w, e, s, n, etc). Let's say that I want to go in the water and so I 'swim e'... I want to configure the exit I just went through to execute the command 'swim e' instead of just 'e' on a speedwalk.
I have already configured my Directions to recognize commands like swim, ford, evade, tumble, crash, and anything else that goes in a direction, so the mapper successfully creates the room and updates my position. That much I know to do, but I'm lost on how to get the room exits to use the proper commands for swimming (or portalling, etc) into a new room. I was hoping that zMUD would know that I used 'swim' to enter and specify that as the command to get in.
Can anyone help me with the command syntax to automatically update the room exit commands? For example, if I 'swim e' I need to update the exit for the room I left to use 'swim e' and also the room I entered to 'swim w'...
Thanks,
Larkin |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Feb 29, 2004 6:10 pm |
This is one way
first make the regular link to the east
then in the exit command for that exit enter SWIM EAST
now anytime you go through that room it will automaticly SWIM EAST |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Sun Feb 29, 2004 7:22 pm |
Well, that's what I've been doing... manually modifying the room properties to put in the proper commands. However, this is tedious work for large areas with lots of exits. I'm hoping to find a way to use something like %roomexit or ADO to update the rooms through triggers or with onroomcreate.
Thanks. |
|
|
 |
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Sun Feb 29, 2004 8:13 pm |
In your exit list does it say something like [Swim East,Swim West]?
If you exits are like that, you can make your own Exit trigger, which loops through the exits, and makes a list of exits Zmud won't understand. Those exits can then be added by %roomportal.
If not, you will probably need to make a #ONINPUT trigger, which checks if the command is a Swim command and the Mapper is on Mapping mode. If it is, then you can put the Swim E in a variable, and redefine the alias OnRoomCreate to add that exit using the function
%roomportal.
Robert |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Mar 01, 2004 2:36 am |
No, the room exits do not say Swim east, etc.
I was hoping that specifying 'swim' in the Directions would help the mapper pick up on the fact that I didn't use a "standard" direction and set that as the room command for me.
Your suggestion of picking up the command and using it in the onroomcreate alias isn't a bad one, however. I don't think I would want to use %roomportal for this, though, since it's not a portal, but a different way to enter the room.
It is possible, for example, to be walking on water and just use the standard way to move (east, instead of swim east, for example). How would I take that into account, I wonder? |
|
|
 |
Timas Novice
Joined: 05 Jan 2003 Posts: 39 Location: Netherlands
|
Posted: Mon Mar 01, 2004 11:17 am |
instead of doing "swim east" to move east and make your mapper understand 'swim' try doing:
>swim east>e
"swim east" will be taken as the command to use and "e" will in this case be the direction used to create the room. Very handy function I use myself after I found sitting in the mapper helpfile. Downside is, you will need to go >swim west>w after this as well.
I'm not sure about the walking on water thing, if that exit is tagged as 'swim east' I think the mapper will use that command everytime you use it.
Edit: Added a thing or two. |
|
|
 |
Serentus Apprentice
Joined: 28 Sep 2001 Posts: 103 Location: USA
|
Posted: Mon Mar 01, 2004 4:36 pm |
One idea you may want to try is to 'swim %lastdir' in responce to the 'You need to swim' message. I don't know if that will work or not, because of when %lastdir get assigned.
So you may need to build you own @Lastdir variable, #ONINPUT {n} {#VAR LastDir {n}} is one way to do that. Then you can 'swim @LastDir' |
|
|
 |
nexela Wizard

Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Mon Mar 01, 2004 4:38 pm |
going along on Timas idea
#Alias swim {>~swim %1>%1}
Not sure if the ~ is needed or not just waking up and to tired to test |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Mar 01, 2004 9:50 pm |
Thanks very much for the help! I wasn't aware of what the 'mapper character' setting was for. Now that it's been explained to me, I'll be sure to take advantage of it.
|
|
|
 |
Greendale Beginner
Joined: 19 Mar 2004 Posts: 17 Location: Sweden
|
Posted: Mon Apr 12, 2004 2:54 am |
Comment to an old post. I found several others with similar problems when I did a search.
I've been struggling with this problem myself for a long time. Just now the solution came to me.
#ONINPUT {^(nw|ne|sw|se|w|e|n|s|u|d|in|out)$} {#IF (%roomcol( )=16744448 or %roomcol( %roomlink( ,%1))=16744448) {#SUBSTITUTE {swim %1}}} "movement" {regex}
All rooms with water are blue on my maps. The above trigger will check if the room you are in, or the room you are going to, is blue (16744448), if so, it will swim there.
If you have marked your rooms that need swimming in a color, go to the room and type #show %roomcol() and it will give you the color code.
Works fine with keypad navigation too. |
|
|
 |
|
|