I'm looking to create a scene where the character automatically unequips his weapon and all armor, and equips a set of noble clothes upon entering the area. I have no problem spawning the clothes into inventory, but all my messing around with EquipItem and UnequipItem has done nothing so far. What should the script look like to equip an item (like clothes) to the chest slot, and remove it?
Thanks in advance!
How do you force an item to equip/unequip?
Débuté par
Obsidian_Warlock
, déc. 08 2009 04:59
#1
Posté 08 décembre 2009 - 04:59
#2
Posté 08 décembre 2009 - 10:41
The following should create chest armour equip it, unequip it, create noble robes then equip those leaving the chest armour in the inventory.
object oChestArmour = UT_AddItemToInventory(R"gen_im_arm_cht_lgt_rlr.uti");
EquipItem(oHero, oChestArmour);
UnequipItem(oHero, oChestArmour);
oChestArmour = UT_AddItemToInventory(R"gen_im_cth_nob_b00.uti");
EquipItem(oHero, oChestArmour);
HTH
Regards
Paul
object oChestArmour = UT_AddItemToInventory(R"gen_im_arm_cht_lgt_rlr.uti");
EquipItem(oHero, oChestArmour);
UnequipItem(oHero, oChestArmour);
oChestArmour = UT_AddItemToInventory(R"gen_im_cth_nob_b00.uti");
EquipItem(oHero, oChestArmour);
HTH
Regards
Paul
#3
Posté 09 décembre 2009 - 02:18
Perfect - I *was* doing it wrong. Fixed, compiled and tested. Finally, the character enters the king's court dressed like a nobleman, not in banged up iron armor.
Thanks Paul!
Thanks Paul!
#4
Posté 13 janvier 2010 - 09:59
does this unequip armors that "cannot be unequiped"?? I've got some armors stuck on my PCs that cannot be unequiped and I dont know what else can I try...
#5
Posté 13 janvier 2010 - 10:43
UnequipItem works regardless of whether or not an item is marked as unequippable.





Retour en haut






