Difference between revisions of "AddItem"
get rid of those annoying messages!
imported>AnoreX |
imported>DragoonWraith (get rid of those annoying messages!) |
||
Line 16: | Line 16: | ||
==Notes== | |||
* You can use a [[Variable_types:_reference_variables|reference variable]] as ''ObjectID'' and a [[Variable_types:_shortint|short]] variable for ''count''. | * You can use a [[Variable_types:_reference_variables|reference variable]] as ''ObjectID'' and a [[Variable_types:_shortint|short]] variable for ''count''. | ||
* 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. | * 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. | ||
*By default, using this function on the player will display a message informing the player that the item in question has been unequipped. In almost all situations, this is very annoying, but you can use a blank [[Message]] call to prevent it from happening, like so: | |||
<pre>Message "" | |||
player.AddItem "item ID" 1</pre> | |||
---- | ---- |