If you click on the scripting function in the function list in the script editor, it'll pop up help text. Here's the help text for that function:
// Create an item with the template sItemTemplate in oTarget's inventory.
// - nStackSize: This is the stack size of the item to be created
// - sNewTag: If this string is not empty, it will replace the default tag from the template
// * Return value: The object that has been created. On error, this returns
// OBJECT_INVALID.
// If the item created was merged into an existing stack of similar items,
// the function will return the merged stack object. If the merged stack
// overflowed, the function will return the overflowed stack that was created.
object CreateItemOnObject(string sItemTemplate, object oTarget=OBJECT_SELF, int nStackSize=1, string sNewTag="")
The parameters with values already specified in the function declaration (oTarget, set to OBJECT_SELF, and nStackSize, set to 1, and sNewTag, set to a blank string) are known as default parameters - values the function will default to if you, the scripter, don't specify different ones, in your use of the function. All you have to do is specify a different stack size:
CreateItemOnObject("nw_wthdt001", oPC, 50);
Funky
Modifié par FunkySwerve, 17 février 2012 - 04:20 .