Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
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.
16,217 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top