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
You could just add that to the NPC's inventory(within the character's UTI file), and it should appear in the remains.
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.
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.
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.
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!!!