Jump to content

Home

more than one item spawning at a time


xx.jason.xx

Recommended Posts

is this just for items in your inventory? if so, no. I am looking for something that will allow me to use a script to put multiples of an item into the PC's inventory, either by a looping script or by modifying the source item to include multiple copies of itself by default.

Link to comment
Share on other sites

I assume you mean like when you kill an enemy and they have things on them? If they are a unique enemy (the utc file is no where else in the game at all) then using the inventory editor in kotor tool would work fine. If they are not a unique character (as most in TSL arent for instance) then you will have to script it so that you get given the items you want and the amount you want to be given.

 

If there is an existing script (like the a_makejedi script in TSL) then you can modify it then recompile it and drop it in to override.

 

Looking at Mira when you turn her in to a Jedi you can add a robe like so:

       *skipping down until we see Mira*
   else if ( nScriptNumber == NPC_MIRA ) {
       AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag("Mira") );
CreateItemOnObject("MirasRobeName", GetFirstPC(), 1, TRUE);

 

You could even give her two or three is you wished. Two ways of doing this:

 

       *skipping down until we see Mira*
   else if ( nScriptNumber == NPC_MIRA ) {
       AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag("Mira") );
CreateItemOnObject("MiraRobeName", GetFirstPC(), 2, TRUE);

 

       *skipping down until we see Mira*
   else if ( nScriptNumber == NPC_MIRA ) {
       AddMultiClass (CLASS_TYPE_JEDISENTINEL, GetObjectByTag("Mira") );
CreateItemOnObject("MiraRobeName", GetFirstPC(), 1, TRUE);
CreateItemOnObject("MiraRobeName", GetFirstPC(), 1, TRUE);

 

Both should work .... But Im still working my way around scripting so dont quote me on it ...

Link to comment
Share on other sites

No worries. Also if you were going to add a couple of other things to the list just change

 

CreateItemOnObject("MiraRobeName", GetFirstPC(), 1, TRUE);

 

To

CreateItemOnObject("item_name", GetFirstPC(), 1, TRUE);

In this instance I would add a lightsaber to her inventory aswell.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...