Jump to content

Home

Scripting Help


RandomTask

Recommended Posts

Hello chaps i'm having a spot of bother i'm trying to write a script that will unequip mandalore's armour and equip a jedi robe im aware that it will not change his appearance and he will still look the same and that he wont equip a jedi robe unless he has the rights feats but i believe i have taken care of all that any help greatly appreciated

Link to comment
Share on other sites

Hello chaps i'm having a spot of bother i'm trying to write a script that will unequip mandalore's armour and equip a jedi robe im aware that it will not change his appearance and he will still look the same and that he wont equip a jedi robe unless he has the rights feats but i believe i have taken care of all that any help greatly appreciated

 

Something like this should work, provided that Mandalore is in the area where it is fired:

 

void main() {
   object oMand = GetObjectByTag("mand");
   if (GetIsObjectValid(oMand)) {
       GrantFeat(FEAT_JEDI_DEFENSE, oMand);
       object oArmor = GetItemInSlot(INVENTORY_SLOT_BODY, oMand);
       AssignCommand(oMand, ActionUnequipItem(oArmor, TRUE));  

       oArmor = CreateItemOnObject("a_robe_08", oMand);
       AssignCommand(oMand, ActionEquipItem(oArmor, INVENTORY_SLOT_BODY, TRUE));       
   }
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...