Difference between revisions of "AddItem"

99 bytes added ,  11:26, 8 June 2007
Added save/load info to remote cell onAdd
imported>Scruggs
(onAdd block correction)
imported>Haama
(Added save/load info to remote cell onAdd)
Line 20: Line 20:
* 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 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.
* 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.


*By default, using this function on the player will display a message informing the player that the item in question has been added. In many situations, this is very annoying, but you can use a blank [[Message]] call to prevent it from happening, like so:
*By default, using this function on the player will display a message informing the player that the item in question has been added. In many situations, this is very annoying, but you can use a blank [[Message]] call to prevent it from happening, like so:
Anonymous user