TimBob12 Posted October 2, 2010 Share Posted October 2, 2010 Hi there, I am trying to equip an NPC with a custom datapad. He dies immediately so I want it to appear in remains. However I have attempted to script this. The NPC appears, he dies after a short and sweet conversation, but no datapad appears. I am using the on enter script to make this happen. void main() { // ST: Check if it's the player entering the trigger, and that it hasn't already fired if (!GetLocalBoolean(OBJECT_SELF, 40) && (GetEnteringObject() == GetFirstPC())) { // ST: Make sure the trigger only fires once. SetLocalBoolean(OBJECT_SELF, 40, TRUE); object oNPC1 = CreateObject(OBJECT_TYPE_CREATURE, "c_officer_corpse", Location(Vector(25.38,66.07,14.61), 0.0)); CreateItemOnObject("czerka_o_datapad",oNPC1); } ExecuteScript("k_ptat20aa_enter_old", OBJECT_SELF); } Please help. I am stumped. I am pretty sure I have used this script before and it worked. Thanks in advance. TimBob12 Link to comment Share on other sites More sharing options...
Rtas Vadum Posted October 2, 2010 Share Posted October 2, 2010 You could just add that to the NPC's inventory(within the character's UTI file), and it should appear in the remains. Link to comment Share on other sites More sharing options...
TimBob12 Posted October 2, 2010 Author Share Posted October 2, 2010 I couldn't work our how to add custom items to the inventory. I could only work out how to add items already in the game. Link to comment Share on other sites More sharing options...
Rtas Vadum Posted October 2, 2010 Share Posted October 2, 2010 I couldn't work our how to add custom items to the inventory. I could only work out how to add items already in the game. Just add any of the in-game items, then change the ResRef column to match the name of the datapad's uti file. Link to comment Share on other sites More sharing options...
LDR Posted October 3, 2010 Share Posted October 3, 2010 Go into K-GFF Editor (if you have it), and open the utc file with it. Then, go under inventory, and add the item into it. Link to comment Share on other sites More sharing options...
TimBob12 Posted October 4, 2010 Author Share Posted October 4, 2010 Neither of these methods make it dropable. I have used exactly the same script in another part of my mod and it works fine. AHHHHHHHHHH this is so frustrating!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.