Difference between revisions of "LlGiveInventory"

From Second Life Wiki
Jump to navigation Jump to search
(no delay on attachments. Tested by Cedrick Oceanland (thanks))
m
Line 21: Line 21:
}</lsl>
}</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGiveInventoryList]]}}
|also_functions=
{{LSL DefineRow||[[llGiveInventoryList]]}}
{{LSL DefineRow||[[llSetRemoteScriptAccessPin]]}}
{{LSL DefineRow||[[llSetRemoteScriptAccessPin]]}}
{{LSL DefineRow||[[llMapDestination]]}}
{{LSL DefineRow||[[llMapDestination]]}}
|also_events={{LSL DefineRow||[[changed]]}}
|also_events=
|also_tests
{{LSL DefineRow||[[changed]]}}
|also_tests=
{{LSL DefineRow||[[llGiveInventory Test]]}}
|also_articles
|also_articles
|notes
|notes

Revision as of 13:02, 3 November 2008

Summary

Function: llGiveInventory( key destination, string inventory );

Give inventory to destination.

• key destination Avatar or object UUID.
• string inventory an item in the inventory of the prim this script is in

If destination is an object then it must be in the same region.
If destination is an avatar they do not have to be in the same region.

Caveats

  • If destination is an avatar the script sleeps for 2.0 seconds. (Giving to attachments has no delay)
  • If inventory is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL.
  • There is no way to know if the transaction failed.
  • Scripts reach destination disabled (not running). To send a running script to a prim use llSetRemoteScriptAccessPin
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   touch_start(integer n)
   {
       //Gives this script to whoever touches the object.
       llGiveInventory(llDetectedKey(0), llGetScriptName());
   }
}</lsl>

See Also

Events

•  changed

Functions

•  llGiveInventoryList
•  llSetRemoteScriptAccessPin
•  llMapDestination

Deep Notes

Search JIRA for related Issues

Tests

•  llGiveInventory Test

Signature

function void llGiveInventory( key destination, string inventory );