Difference between revisions of "OnDrop"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>JOG
(Moved to "Category: Blocktypes")
imported>Flatline hun
Line 6: Line 6:


This block will be run once when the scripted object is dropped from the Container's inventory. If no parameter is used, the block will be run whenever the object is dropped from anything's inventory.  
This block will be run once when the scripted object is dropped from the Container's inventory. If no parameter is used, the block will be run whenever the object is dropped from anything's inventory.  
 
Apparently this block will run when object is placed from one container to another, such as placing the object from player's inventory to any container.
If you need to execute script when the object is dropped to the ground by the player, you need to place an '''if (MenuMode == 2)''' condition within the OnDrop block, or else the OnDrop block will run even if the object is placed into a container.--[[User:Flatline hun|Flatline hun]] 04:45, 22 June 2006 (EDT)
[[Category: Blocktypes]]
[[Category: Blocktypes]]

Revision as of 03:45, 22 June 2006

Syntax:

 begin OnDrop ContainerRefID (optional) 

Example:

 begin OnDrop 
 begin OnDrop player 

This block will be run once when the scripted object is dropped from the Container's inventory. If no parameter is used, the block will be run whenever the object is dropped from anything's inventory. Apparently this block will run when object is placed from one container to another, such as placing the object from player's inventory to any container. If you need to execute script when the object is dropped to the ground by the player, you need to place an if (MenuMode == 2) condition within the OnDrop block, or else the OnDrop block will run even if the object is placed into a container.--Flatline hun 04:45, 22 June 2006 (EDT)