Copy an InventoryScript item from the Agents
Inventory into a primitives task inventory
Declaration Syntax
C# |
public UUID CopyScriptToTask( uint objectLocalID, InventoryItem item, bool enableScript )
Parameters
- objectLocalID ( UInt32)
- An unsigned integer representing a primitive being simulated
- item ( InventoryItem)
- An which represents a script object from the agents inventory
- enableScript ( Boolean)
- true to set the scripts running state to enabled
Return Value
A Unique Transaction ID
Examples
The following example shows the basic
steps necessary to copy a script from the agents inventory into a
tasks inventory and assumes the script exists in the agents
inventory.
Copy | |
---|---|
uint primID = 95899503; // Fake prim ID UUID scriptID = UUID.Parse( "92a7fe8a-e949-dd39-a8d8-1681d8673232"); // Fake Script UUID in Inventory Client.Inventory.FolderContents(Client.Inventory.FindFolderForType(AssetType.LSLText), Client.Self.AgentID, false, true, InventorySortOrder.ByName, 10000); Client.Inventory.RezScript(primID, (InventoryItem)Client.Inventory.Store[scriptID]); |
See Also
Assembly: OpenMetaverse(Module: OpenMetaverse.dll) Version: 0.9.3.3318 (0.9.3.3318)