-
Notifications
You must be signed in to change notification settings - Fork 14
Working with Equipment
Basic understanding of GDscript Basic understanding of the Node tree A HumanizerEditorTool Node has been placed somewhere in your node tree and you have referenced it as a variable called "het" as shown below
To attach a piece of equipment to a humanizer editor node, the following line of code can be executed, the EQUIPMENT_NAME is defined in the .mhclo file as "name" and the texture is used if multiple textures are available for the same object. for instance body's skin.
het.add_equipment(HumanizerEquipment.new("EQUIPMENT_NAME","EQUIPMENT_TEXTURE"))
If you know the slot name, you can remove the equipment that is in that slot using the following code.
het.humanizer.remove_equipment_in_slot("SLOT_NAME")
Slot names can be looked up by looping through the items in HumanizerRegistry.equipment and getting the slots for each item.
if you know what file was equipped you can remove the equipment from all of the slots using the following line of code.
het.add_equipment(HumanizerEquipment.new("EQUIPMENT_NAME"))