Difference between revisions of "Attach/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Event |event_id=23 |event_delay |event=attach |p1_type=key |p1_name=id |p1_desc=装着されていたなら該当アバタ、装着されていなかった場合には{{LSL_Constant/...)
 
Line 12: Line 12:
|caveats
|caveats
|examples=
|examples=
以下はattachイベントの簡易例です。上の変数idは、用意されたオブジェクトがのアバターのキーAs explained above the variable id that will be the key of the avatar when the scripted object is attached to otherwise that  it will take on the value of {{LSL_Constant/NULL_KEY}}. The conditional [[if]] statement is used to determine if the value of the variable id.
以下はattachイベントの簡易例です。
上の変数idから{LSL_Constant/NULL_KEY}}以外のアバターのキーを受け取ったときに、用意されたオブジェクトが装着される、という説明です。
上の変数idから{LSL_Constant/NULL_KEY}}以外のアバターのキーを受け取ったときに、用意されたオブジェクトが装着される、という説明です。



Revision as of 19:06, 16 January 2008

Description

Event: attach( key id ){ ; }

オブジェクトがエージェントに装着もしくは取り外す時に作動します。

• key id 装着されていたなら該当アバタ、装着されていなかった場合にはNULL_KEY

Examples

以下はattachイベントの簡易例です。 上の変数idから{LSL_Constant/NULL_KEY

Deep Notes

Signature

event void attach( key id );

以外のアバターのキーを受け取ったときに、用意されたオブジェクトが装着される、という説明です。

<lsl>default {

   attach(key id)
   {
       if(id)//tests if it is a valid key and not NULL_KEY
       {
           llSay(PUBLIC_CHANNEL,"I have been attached!");
       }
       else
       {
           llSay(PUBLIC_CHANNEL,"I have been detached!");
       }
   }

}</lsl> |helpers |also_header |also_events |also_functions= |-style="vertical-align:top;" | style="color:gray;" |• llAttachToAvatar | | style="color:gray;" | | | |-style="vertical-align:top;" | style="color:gray;" |• llDetachFromAvatar | | style="color:gray;" | | | |-style="vertical-align:top;" | style="color:gray;" |• llGetAttached | | style="color:gray;" | | | |also_articles= |-style="vertical-align:top;" | style="color:gray;" |• Attachment/ja | | style="color:gray;" | | | |also_footer |notes |mode |deprecated |cat1=Attachment/ja |cat2 |cat3 |cat4}}