Hi there,
I am trying to spawn a bag in the Sand People Enclave (KOTOR 1). It appears, as it should, but no matter how I try and put something in it nothing appears. I have tried scripting it, using KOTOR Tool and a GFF Editor but nothing works. I even tried extracting a premade placeablewith items in, from the game and just spawning it but even then nothing appears in it. Any help would be greatly appreciated.
Thanks
TimBob12
Is everything being done in a single script or multiple scripts?
Have you tried making the placeable normally come with items in it? Such as open the item list of the placeable with KOTOR Tool and add the items you want.
Yeah i have tried that and not even that worked. I am trying to put a datapad in a placeable of some kind.
What does your current script look like?
Here is the current on_enter script
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 oP1 = CreateObject(OBJECT_TYPE_PLACEABLE, "czerka_bag", Location(Vector(25.38,66.07,14.61), 0.0));
CreateItemOnObject("co_pad",oP1);
}
ExecuteScript("k_ptat20aa_enter_old", OBJECT_SELF);
}
I have also added the datapad to the item's inventory as well.
I can't see anything wrong with the script and as the placeable is spawned the only thing that comes to mind is if the item co_pad exists in the override folder.
Check that it's there and has the right tags etc. I can't tell you the amount of times I've had the same problem, tried all kinds of crazy crap and it turned out I hadn't placed the item in the override folder.
I have checked all the tags and the filename and all the files are definately in the Override.
Try creating a default item such as g_w_lghtsbr01 on the placeable and see what happens.
I tried that before with a double sword and it still didn't show up.
Im wondering if it is something about the module because I had an NPC that died and you could collect from his corpse but even then none of the items I equipped him with worked.
That was when i tried replacing him with a placeable.
show us a snapshot of the .utp?
Thanks for the help guys but in the end It was easier just to put the item onto a skeletal corpse right next to where I had my other placeable and that works fine. If anybody knows how to fire an add journal script after getting the contents of the placeable cause that would be a great help. I tried it on the OnClose section but it didn't work.