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
Almir
Newbie


Joined: 08 Dec 2005
Posts: 5

PostPosted: Tue Dec 13, 2005 10:27 pm   

Triggers and word wrapping
 
Hey, sorry if I'm asking an often-repeated question, but I've not been able to find and answer anwhere Embarassed

I have written script that is basically a direction pad which graphically shows all available exits, using buttons. It's working really well, apart from in the event that the list of exits is so long that it wraps.
Currently the script uses the following trigger:

#trigger {^You see exits leading (*)} { #var validDirs %replace( %replace( %replace( %replace( "%1", ",", ""), "and ", ""), " ", "|"), ".", "") }

This usually makes a list of all the exits in validDirs which I can then reference later in the script. However, if the list of exits wraps, the trigger doesn't pick up anything that's sent to another line. For instance, in this room:

Quote:
You see exits leading northeast, east (closed door), southeast, southwest, west,
northwest, up, and in (closed door).


the directions northwest, up and in are omitted.
I know I could solve this by increasing the line length in game, but that really messes up formatting Rolling Eyes So if there are any other solutions, that'd be great!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Tue Dec 13, 2005 10:35 pm   
 
Multistate triggers! although they can get complicated :p


Quote:
I know I could solve this by increasing the line length in game, but that really messes up formatting Rolling Eyes So if there are any other solutions, that'd be great!

Increase line length as much as you can and then in zmuds prefrences for word wrap adjust those valuse and Voila client side wrapping that looks just the same as server side
_________________
Zmud Support Library
Zmud Knowledge Base
Reply with quote
Almir
Newbie


Joined: 08 Dec 2005
Posts: 5

PostPosted: Tue Dec 13, 2005 10:45 pm   
 
Ooh, it's just like magic! Thank you for your help again :D
Reply with quote
Fatal_Exception
Newbie


Joined: 25 Oct 2004
Posts: 3

PostPosted: Wed Dec 14, 2005 5:52 am   
 
One caveat however: If you don't set the mud's line lenght to a multiple of your zmud prefs, you'll get line breaks mid-line
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