LlDetachFromAvatar/ja
From Second Life Wiki
関数: llDetachFromAvatar( );
アバタからオブジェクトを外します。
実行するにはownerにPERMISSION_ATTACHの権限が必要です。
外されたオブジェクトはユーザの持ち物に収まります。
警告
- スクリプトに権限PERMISSION_ATTACHが不足している場合、スクリプトはDEBUG_CHANNEL上でエラーを報告して、演算に失敗するでしょう。(しかしスクリプトは実行し続けます。)
- owner以外の誰かにPERMISSION_ATTACHが付与された場合、関数はDEBUG_CHANNEL上で報告されるエラーを呼び出します。
例
default { attach(key AvatarKey) {//give instructions for use and prevent item from being attached to avatar if(AvatarKey) {//event is called on both attach and detatch, but Key is only valid on attach llOwnerSay (" We hope you will enjoy your purchase, but if you really want to use this item properly, you should: 1) drag it from your inventory to the ground 2) Right click on it and select \"open\" 3) copy its contents to inventory."); llRequestPermissions(AvatarKey, PERMISSION_ATTACH ); } } run_time_permissions(integer perm) { if(perm & PERMISSION_ATTACH) { llDetachFromAvatar( ); } } }
関連項目
イベント
| • | run_time_permissions | – | 権限で受信するイベントです | |
| • | attach |
関数
| • | llGetPermissions | – | 付与されている権限を取得します | |
| • | llGetPermissionsKey | – | 権限が付与されているエージェントを取得します | |
| • | llRequestPermissions | – | 権限を要求します | |
| • | llAttachToAvatar | |||
| • | llGetAttached |
項目
| • | スクリプトの権限 |

