View Single Post
Old 08-22-2012, 05:09 PM   #33
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,288
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
All right, so I went and started scripting the things just to see if it'd even be possible to completely duplicate your PC (armor, weapons, head items, etc.). I got the spawning to work so the duplicate that spawns will be the right height/gender, but even the though the script that would equip the duplicate with the right stuff compiles, when I attempt to run it in-game the script doesn't work. Here's the script itself:

Code:
void main()
{

   object oPC = GetFirstPC();

   object oDuplicate = GetObjectByTag("dup_pcfm");

   object oRWep = GetItemInSlot(4, oPC);

   object oLWep = GetItemInSlot(5, oPC);

   object oHGear = GetItemInSlot(0, oPC);

   object oArmor = GetItemInSlot(1, oPC);

      string sTRWep = GetTag(oRWep);

      string sTLWep = GetTag(oLWep);

      string sTHGear = GetTag(oHGear);

      string sTArmor = GetTag(oArmor);
  
         object oRWepD = GetObjectByTag(sTRWep);

         object oLWepD = GetObjectByTag(sTRWep);

         object oHGearD = GetObjectByTag(sTRWep);

         object oArmorD = GetObjectByTag(sTRWep);


         CreateItemOnObject(sTRWep, oDuplicate, 1);

         CreateItemOnObject(sTLWep, oDuplicate, 1);

         CreateItemOnObject(sTHGear, oDuplicate, 1);

         CreateItemOnObject(sTArmor, oDuplicate, 1);


            AssignCommand(oDuplicate, ActionEquipItem(oRWepD, 4, TRUE));

            AssignCommand(oDuplicate, ActionEquipItem(oLWepD, 5, TRUE));

            AssignCommand(oDuplicate, ActionEquipItem(oHGearD, 0, TRUE));

            AssignCommand(oDuplicate, ActionEquipItem(oArmorD, 1, TRUE));


               DuplicateHeadAppearance(oDuplicate, oPC);


}
I put in a sendmessage to PC function in various spots a bit ago, to see if it was cutting off at some point, and apparently it cuts off after the CreateItemOnObject. Now I know both JCarter and Hassat Hunter, who are both very good at scripting, have looked at this thread so I was wondering if they, or anyone, could help me figure out what the problem is with the script.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,