[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  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] Refresh page


Posted by Swimming   (20 posts)  [Biography] 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

[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] 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
[Go to top] top

Posted by Swimming   (20 posts)  [Biography] bio
Date Reply #2 on Thu 04 May 2006 05:26 AM (UTC)
Message
yay!
figured it out..
that was easy.
thanks anyways.
[Go to top] top

Posted by Sylaer   (20 posts)  [Biography] bio
Date Reply #3 on Thu 04 May 2006 06:01 AM (UTC)
Message
Out of curiosity, Swimming, what was your solution?
[Go to top] top

Posted by Swimming   (20 posts)  [Biography] 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.
[Go to top] 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.


11,926 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]