Clothing Slots

From ADRIFT 5 Manual Wiki
Revision as of 02:15, 6 April 2012 by Saabie (Talk | contribs) (Worn-On Property)

Jump to: navigation, search

The standard library "wear" command allows the player to wear any dynamic objects that have the "Object is Wearable" property set.

If there are two hats in the game then the player can pick them up and wear both of them at the same time.

In this tutorial we will create clothing "slots", which are specific locations on the body, each of which can wear only one item of clothing at a time.

Construction.gif


The Worn-On Property

We need to be able to specify which part of the body a particular object is worn on.

There are many ways you could do this, here i have created an object property so i can simply select the bodypart from a drop-down list as i create each item of clothing.

PropertyDialogWornOn.jpg

  • The "Type" is set to "State List" and the bodyparts are listed at the bottom. I have used 4, but you might want to split "Body" into "Torso" and "Hips" or add separate arms and legs, or wrists, finger and neck (for jewelry).
  • Specify that this property will only appear if "Object is wearable" is selected. This hides this option for objects that are not clothing, and also ensures that these two properties will appear together on the property list.
  • If you dont make this property "Mandatory" then you can have items of clothing which are



IconWarning.png The current version of ADRIFT (5.0.22) does not have any way to write an %object% reference to a property, so it is not currently possible to have a body-part object (Location of the object="Part of character") which keeps track of which object it is currently wearing. (Enhancement Request)