Gammon Forum
Entire forum
SMAUG
SMAUG coding
desc when going thru exit
desc when going thru exit
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Swimming
(20 posts) bio
|
Date
| Wed 03 May 2006 02:34 AM (UTC) |
Message
| I'm looking to make certain exits have descriptions you get when you travel through them.
like:
>east
You tromp through the bushes and wind up in a stream.
then show the room desc and stuff
i'll try my hand and begin fiddlin' with stuff, but in the meanwhile any suggestions will be most helpful.
rock on
| top |
|
Posted by
| David Haley
USA (3,881 posts) bio
|
Date
| Reply #1 on Wed 03 May 2006 03:51 AM (UTC) |
Message
| This might already be implemented with exit descs, but that might also be a feature added to my codebase before I took over.
Anyhow, the idea is pretty straightforward; just add an extra field to your exit_data structure called "exit_desc" or something similar, and whenever somebody takes an exit, if the exit's exit_desc is not null, print it to them. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | top |
|
Posted by
| Swimming
(20 posts) bio
|
Date
| Reply #2 on Thu 04 May 2006 05:26 AM (UTC) |
Message
| yay!
figured it out..
that was easy.
thanks anyways. | top |
|
Posted by
| Sylaer
(20 posts) bio
|
Date
| Reply #3 on Thu 04 May 2006 06:01 AM (UTC) |
Message
| Out of curiosity, Swimming, what was your solution? | top |
|
Posted by
| Swimming
(20 posts) bio
|
Date
| Reply #4 on Fri 05 May 2006 12:07 AM (UTC) |
Message
| added a movedesc to exit_data structure,
stuck it in after keyords of the exit in the area files,
and in act_mov.c, in ch_ret move_char
after
char_from_room( ch );
if (pexit->movedesc && pexit->movedesc[0] != '\0')
send_to_char(pexit->movedesc,ch);
before
char_to_room( ch, to_room );
working ok so far. | top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,051 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.