Difference between revisions of "AddItem"
Consolidate no spam info.
imported>Quetzilla |
imported>Wrye (Consolidate no spam info.) |
||
Line 20: | Line 20: | ||
* This function will trigger an [[onAdd]] block in a script attached to the target container, as long as the container is in a loaded cell. When used on a container in a remote cell, the [[onAdd]] block won't run until the player enters that container's cell. However, if the player enters the remote cell after saving and loading, the onAdd block won't run. | * This function will trigger an [[onAdd]] block in a script attached to the target container, as long as the container is in a loaded cell. When used on a container in a remote cell, the [[onAdd]] block won't run until the player enters that container's cell. However, if the player enters the remote cell after saving and loading, the onAdd block won't run. | ||
** Note that this is only true for the onAdd block, the rest of the script will still run if applicable (GameMode block will run if it's GameMode, MenuMode if MenuMode, etc.). The script will run once, as if it were loaded. If you have any variables set on the script, it will run the next frame as well and will continue to run until no variables are set. | ** Note that this is only true for the onAdd block, the rest of the script will still run if applicable (GameMode block will run if it's GameMode, MenuMode if MenuMode, etc.). The script will run once, as if it were loaded. If you have any variables set on the script, it will run the next frame as well and will continue to run until no variables are set. | ||
* | * See [[Message Spam]] for techniques to avoid unwanted "Item Added" messages. | ||
==Console Usage== | ==Console Usage== | ||
Line 50: | Line 45: | ||
==See Also== | ==See Also== | ||
*[[AddItemNS]] | *[[AddItemNS]] - Spamless version of command (OBSE 15). | ||
*[[GetItemCount]] | |||
*[[RemoveItem]] | *[[RemoveItem]] | ||
*[[ | *[[Message Spam]] - Techniques for avoiding message spam. | ||
==Reference== | ==Reference== |