Difference between revisions of "OnAdd"

229 bytes added ,  06:32, 2 August 2009
m
Reverted edits by Elei-Mi-Shill (Talk); changed back to last version by Quetzilla
imported>Haama
(Added save/load info to remote cell onAdd)
imported>Qazaaq
m (Reverted edits by Elei-Mi-Shill (Talk); changed back to last version by Quetzilla)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Syntax:'''
'''Syntax:'''
   begin OnAdd ContainerRefID (optional)
   begin OnAdd ''ContainerRefID''
'''Example:'''
'''Example:'''
  begin OnAdd  
  begin OnAdd  
Line 8: Line 8:


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. However, the onAdd block won't run if you've saved and reloaded before entering the remote cell.
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. However, the onAdd block won't run if you've saved and reloaded before entering the remote cell.
If you add an item to a container and then remove it later in the same block of code, the OnAdd block will not run.  The item must remain in the new container for at least one frame after it is added in order for the block to trigger.


[[Category: Blocktypes]]
[[Category: Blocktypes]]
Anonymous user