Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ best way to handle body parts?

best way to handle body parts?

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


Posted by Swimming   (20 posts)  Bio
Date Fri 24 Mar 2006 12:06 AM (UTC)
Message
hi. just curious as to what you think the best way to handle bodyparts may be.
i have some ideas and would like to know what you think.
there are many races, some with wings and arms, some with legs and wings.. and i'm hoping to have them set as race's arm, race's leg, etc..
so should i
have one set of bodyparts, that are assigned to the race via the race file? all the body parts being set in an area file.
if it's that way, that would work for pc races, but what of
npc? should i set up race files for npcs as well? or just set up the body parts in the code?
i have other questions as well, but cannot think of how to prase them right now.
i know it has the parts that get chopped off after a fight, but i did not want to do that with them. i want to have them to keep track of damage to character..

thanks

Top

Posted by Dace K   Canada  (169 posts)  Bio
Date Reply #1 on Fri 24 Mar 2006 08:01 PM (UTC)
Message
Uh.. you should define an int bodycondition[x] under the char_data struct. Then, in ch_ret damage, assign damage to a number_range(0, x), and then call a function that updates that bodypart depending on the damage it's taken - that is, if you want broken limbs/disembowelment and the such.

To see bodypart info for difference between things like wings and arms over different races, a switch statement under show_condition would probably be your best bet, unless you've going to have wildly differing characteristics between each char: for example ebon-tipped wings vs. snow-white wings.

ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com

Drop by the area archives and find something for your mud. http://areaarchives.servegame.com
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.


10,033 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.