OsGetLinkInventoryKey
From OpenSimulator
(Difference between revisions)
JeffKelley (Talk | contribs) m (Example added) |
JeffKelley (Talk | contribs) m (Never edit a valid script before publishing.) |
||
Line 20: | Line 20: | ||
key textureUuid = osGetLinkInventoryKey (LINK_ROOT, textureName, INVENTORY_TEXTURE); | key textureUuid = osGetLinkInventoryKey (LINK_ROOT, textureName, INVENTORY_TEXTURE); | ||
llOwnerSay ("Painting prim with texture "+textureUuid); | llOwnerSay ("Painting prim with texture "+textureUuid); | ||
− | if ( | + | if (textureUuid != NULL_KEY) |
llSetTexture (textureUuid, ALL_SIDES); | llSetTexture (textureUuid, ALL_SIDES); | ||
} | } |
Revision as of 08:30, 21 June 2024
key osGetLinkInventoryKey(integer linkNumber, string name)
| |
Returns id(key) of a inventory item asset within a prim inventory. If name is not unique result maybe unpredictable. This function extends llGetInventoryKey( string name ) to links. Returns NULL_KEY if the item is not found or Owner has no rights | |
Threat Level | This function does not do a threat level check |
Permissions | Script owner needs modify, copy and transfer rights |
Extra Delay | 0 seconds |
Example(s) | |
// // osGetLinkInventoryKey Script Example // // This script runs in link #2 // It will paint the prim with // a texture in root inventory default { state_entry() { string textureName = "K1100RS"; key textureUuid = osGetLinkInventoryKey (LINK_ROOT, textureName, INVENTORY_TEXTURE); llOwnerSay ("Painting prim with texture "+textureUuid); if (textureUuid != NULL_KEY) llSetTexture (textureUuid, ALL_SIDES); } } | |
Notes | |
osGetInventoryItemKey added in 0.9.1.0 Dev, Implemented August, 16 2019 osGetLinkInventoryKey added in 0.9.3.0 Dev, March 2024 |
See Also: