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
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Dec 23, 2007 7:26 pm   

Help needed to resolve a direction variable issue.
 
Under the "n" direction I set the command to:

north|swim n|leap n|tumble n|crash n|n

So that if I do any of those things it recognizes it as a movement. This works well for recognizing those as movement, but it also has a side effect in that when it goes to open a door it will now enter:

open door tumble n

If I go edit the "n" direction to not include "tumble n" it will pick one of the other commands in the "n" direction commands such as "leap n". Does anyone have a solution to this issue?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Dec 23, 2007 8:46 pm   
 
I think it might be that it uses the longest item in the list. Try adjusting your list to this "n| north|swim n|leap n|tumble n|crash n", you may also have to put "north" in there so that it can match the word. I have never actually tried this method because I always just tell the mapper what it is doing instead of letting it tell the scripts what to do.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Dec 24, 2007 2:03 am   
 
Hmm, putting them in quotes didn't help and the full spelled out "north" was already there. Sounds like I might need Zugg to weigh in on the internal workings to help sort this out.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Dec 24, 2007 2:52 am   
 
Sorry, forgot the code tags on it
Code:
n|          north|swim n|leap n|tumble n|crash n
That was what I meant when I said
Quote:
I think it might be that it uses the longest item in the list.

_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Dec 24, 2007 5:01 am   
 
Ahhh, you nailed it! Adding the spaces to make it the longest did work perfectly.
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