OsGiveLinkInventory
From OpenSimulator
(Difference between revisions)
JeffKelley (Talk | contribs) (Created page with "{{osslfunc |threat_level=ignored |permissions=true |delay=0|function_syntax=osGiveLinkInventory(integer linkNumber, key destination, string inventory)<br> |ossl_example=<sourc...") |
(Translated comments) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
|threat_level=ignored | |threat_level=ignored | ||
|permissions=true | |permissions=true | ||
− | |delay= | + | |delay=3|function_syntax=osGiveLinkInventory(integer linkNumber, key destination, string inventory)<br> |
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> | ||
+ | // Example for osGiveLinkInventory | ||
+ | // This script uses the osGiveLinkInventory function to give the specified inventory from the specified link to a specified avatar | ||
+ | // Note: The variables have to be replaced with their actual values, the used names are just placeholders | ||
+ | |||
+ | // Define the link number to search for the inventory item | ||
+ | integer CHILD_PRIM_NUMBER = 2; | ||
+ | // Define the avatar, by key, to which to give the item | ||
+ | key targetAvatar = "TARGET_KEY"; | ||
+ | // Define the item by name | ||
+ | string itemName = "INVENTORY_NAME"; | ||
+ | |||
+ | // Event handler, that is executed on script start | ||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | // Run the osGiveLinkInventory function with parameters to hand the specified item over | ||
+ | osGiveLinkInventory(CHILD_PRIM_NUMBER, targetAvatar, itemName); | ||
+ | } | ||
+ | } | ||
</source> | </source> | ||
|description= | |description= |
Latest revision as of 16:39, 26 February 2024
osGiveLinkInventory(integer linkNumber, key destination, string inventory)
| |
Give an item located in a child prim inventory. | |
Threat Level | This function does not do a threat level check |
Permissions | Use of this function is always allowed by default |
Extra Delay | 3 seconds |
Example(s) | |
// Example for osGiveLinkInventory // This script uses the osGiveLinkInventory function to give the specified inventory from the specified link to a specified avatar // Note: The variables have to be replaced with their actual values, the used names are just placeholders // Define the link number to search for the inventory item integer CHILD_PRIM_NUMBER = 2; // Define the avatar, by key, to which to give the item key targetAvatar = "TARGET_KEY"; // Define the item by name string itemName = "INVENTORY_NAME"; // Event handler, that is executed on script start default { state_entry() { // Run the osGiveLinkInventory function with parameters to hand the specified item over osGiveLinkInventory(CHILD_PRIM_NUMBER, targetAvatar, itemName); } } | |
Notes | |
This function was added in 0.9.3.0 |