Difference between revisions of "LlGiveInventory"

From Second Life Wiki
Jump to navigation Jump to search
(llGiveInventory has a 2 second delay)
m
Line 1: Line 1:
{{LSL_Function/inventory|inventory|uuid=false|type}}{{LSL_Function
{{LSL_Function/inventory|inventory|uuid=false|type}}{{LSL_Function
|func_id=150|func_sleep=2.0|func_energy=10.0
|func_id=150|func_sleep=2.0|func_energy=10.0|func_sleep_note=This is not reflected in the tooltip or the compiler source code.
|func=llGiveInventory
|func=llGiveInventory
|p1_type=key|p1_name=destination|p1_desc=Avatar or object [[UUID]].
|p1_type=key|p1_name=destination|p1_desc=Avatar or object [[UUID]].

Revision as of 15:40, 12 October 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

  • This function causes the script to sleep for 2.0 seconds. This is not reflected in the tooltip or the compiler source code.
  • 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

Signature

function void llGiveInventory( key destination, string inventory );