OnAdd

Revision as of 03:54, 26 May 2006 by imported>JOG (Moved to "Category: Blocktypes")

Syntax:

 begin OnAdd ContainerRefID (optional)

Example:

begin OnAdd 
begin OnAdd player 

This block will be run once when the scripted object is added to the Container's inventory. If no parameter is used, the block will be run whenever the object is added to anything's inventory.

When the target container isn't in the current cell (or within the 5x5 exterior-cell square), the OnAdd block doesn't run until you enter the cell with the container.