Difference between revisions of "AddItem"

233 bytes added ,  06:35, 26 March 2006
no edit summary
 
imported>Deathbane27
Line 8: Line 8:
Adds Count items of object ObjectID to the calling container's inventory.  
Adds Count items of object ObjectID to the calling container's inventory.  


NOTE: This will not trigger [[OnAdd]] blocks, because the item is created inside the inventory rather than actually being added. For creating items from the console that you need to trigger OnAdd, use [[PlaceAtMe]] instead and pick the item up from the ground.  
NOTE: This will not trigger [[OnAdd]] blocks, because the item is created inside the inventory rather than actually being added. For creating items from the console that you need to trigger OnAdd, use [[PlaceAtMe]] instead and pick the item up from the ground.
 
----
 
Console Usage:  When using AddItem with the console, you must use the desired item's FormID, not the EditorID.
 
So, instead of using
player.additem lockpick 1
to give yourself a lockpick, you must use
player.additem 00000A 1


[[Category: Functions]]
[[Category: Functions]]
[[Category: Object Functions]]
[[Category: Object Functions]]
Anonymous user