Jump to content

Home

Spawning Placeables


TimBob12

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...