Difference between revisions of "OnAdd"

Jump to navigation Jump to search
48 bytes added ,  12:30, 20 January 2009
added See Also
imported>Illyism
(more notes, added syntax and example. removed TES link)
imported>Illyism
(added See Also)
Line 1: Line 1:
__NOTOC__
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.
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.


=='''Syntax:'''==
==='''Syntax:'''===


  begin OnAdd ContainerRefID
  begin OnAdd ContainerRefID


Example:
==='''Example''':===


  begin OnAdd  
  begin OnAdd  
Line 15: Line 17:
*This block won't run when Death Items, including items added via "Add Leveled List On Death" Entry point perks, are first placed in the dead Actor's inventory.
*This block won't run when Death Items, including items added via "Add Leveled List On Death" Entry point perks, are first placed in the dead Actor's inventory.
*This block won't initially run on items that are listed in the actor's inventory tab in the GECK, even when a new instance of an actor is placed in the world.  OnAdd blocks trigger on ''changes'' to an actor's inventory, but not when objects are created along with the container they are placed in (and so the same applies for Container objects placed in the world).
*This block won't initially run on items that are listed in the actor's inventory tab in the GECK, even when a new instance of an actor is placed in the world.  OnAdd blocks trigger on ''changes'' to an actor's inventory, but not when objects are created along with the container they are placed in (and so the same applies for Container objects placed in the world).
==See Also
[[OnDrop]]


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

Navigation menu