OsForceAttachToOtherAvatarFromInventory
From OpenSimulator
(Difference between revisions)
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{osslfunc | {{osslfunc | ||
− | |function_syntax= | + | |function_syntax= osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, integer attachmentPoint) |
|csharp_syntax= | |csharp_syntax= | ||
|description=Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH. Nothing happens if the avatar is not in the region. | |description=Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH. Nothing happens if the avatar is not in the region. | ||
Line 9: | Line 9: | ||
In OpenSimulator 0.7.4. | In OpenSimulator 0.7.4. | ||
− | |threat_level= | + | |threat_level=VeryHigh |
− | |ossl_example= | + | |permissions=false |
− | |additional_info= | + | |delay=0 |
+ | |ossl_example=<source lang="lsl"> | ||
+ | |||
+ | //Author: mewtwo0641 | ||
+ | //Simple example for osForceAttachToOtherAvatarFromInventory that attaches a list of items on touch | ||
+ | |||
+ | //List of items in object inventory to be attached in format: item_name, attach_point | ||
+ | list items = | ||
+ | [ | ||
+ | "Belt", (string)ATTACH_BELLY, | ||
+ | "Hat", (string)ATTACH_HEAD, | ||
+ | "Left Shoe", (string)ATTACH_LFOOT, | ||
+ | "Right Shoe", (string)ATTACH_RFOOT | ||
+ | ]; | ||
+ | |||
+ | key toucher; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | touch_start(integer x) | ||
+ | { | ||
+ | toucher = llDetectedKey(0); | ||
+ | |||
+ | integer i = 0; | ||
+ | |||
+ | for(i; i < llGetListLength(items); i++) | ||
+ | { | ||
+ | string name = llList2String(items, i); | ||
+ | integer point = (integer)llList2String(items, i + 1); | ||
+ | osForceAttachToOtherAvatarFromInventory(toucher, name, point); | ||
+ | i++; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | </source> | ||
+ | |additional_info=This function was added in 0.7.4-post-fixes | ||
}} | }} |
Revision as of 17:16, 1 May 2019
osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, integer attachmentPoint)
| |
Attach an inventory item in the object containing this script to any avatar in the region without asking for PERMISSION_ATTACH. Nothing happens if the avatar is not in the region.
In OpenSimulator 0.7.4. | |
Threat Level | VeryHigh |
Permissions | Use of this function is always disabled by default |
Extra Delay | 0 seconds |
Example(s) | |
//Author: mewtwo0641 //Simple example for osForceAttachToOtherAvatarFromInventory that attaches a list of items on touch //List of items in object inventory to be attached in format: item_name, attach_point list items = [ "Belt", (string)ATTACH_BELLY, "Hat", (string)ATTACH_HEAD, "Left Shoe", (string)ATTACH_LFOOT, "Right Shoe", (string)ATTACH_RFOOT ]; key toucher; default { touch_start(integer x) { toucher = llDetectedKey(0); integer i = 0; for(i; i < llGetListLength(items); i++) { string name = llList2String(items, i); integer point = (integer)llList2String(items, i + 1); osForceAttachToOtherAvatarFromInventory(toucher, name, point); i++; } } } | |
Notes | |
This function was added in 0.7.4-post-fixes |