Difference between revisions of "Link message/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Event/ja|event_id=29|event_delay|event=link_message |p1_type=integer|p1_name=sender_num|p1_desc |p2_type=integer|p2_name=num|p2_desc |p3_type=string|p3_name=str|p3_desc |p4_type=key|...)
 
m
Line 48: Line 48:
|mode
|mode
|cat1=Link/ja
|cat1=Link/ja
|cat2=Communications/ja
|cat2=Communications
|cat3=Link Message/ja
|cat3=Link Message
|cat4
|cat4
}}
}}

Revision as of 03:40, 17 April 2008

説明

イベント: link_message( integer sender_num, integer num, string str, key id ){ ; }

タスクがllMessageLinkedライブラリ関数の呼び出しを元にリンクメッセージを受信するときに作動します。

• integer sender_num
• integer num
• string str
• key id

警告

  • 64link_messageイベントをためることができ、超えた場合は通知なく溢してしまいます!早く行なおうとして、イベントを過多実行しないでください。

サンプル

//This is just an example script, you shouldn't handle touches within single script this way.

default
{
    touch_start(integer c)
    {
        llMessageLinked(LINK_THIS, 0, llDetectedName(0), llDetectedKey(0));
    }
    link_message(integer source, integer num, string str, key id)
    {
        llWhisper(0, str + " (" + (string)id + ") touched me!");
    }
}

便利なスニペット

// This is just an example script, you shouldn't handle link message within single script this way.

default{ // To propagate an unlimited number of arguments of any type.
	// Presumed, the separator string isn't used in any source string!
    state_entry() {    
        list my_list = [1, 2.0, "a string", <1, 2, 3>, <1, 2, 3, 4>, llGetOwner()];  
        string list_parameter = llDumpList2String(my_list, "|");	// Typecast list to a string
        llMessageLinked(LINK_THIS, 0, list_parameter, NULL_KEY)
    }

    link_message(integer sender_num, integer num, string list_argument, key id) {
        list re_list = llParseString2List(list_argument, ["|"], [""]);	// Typecast string back to a list
    }    
}

注意点

スクリプトは自身のリンクメッセージを聞くことができます。

参考情報

関数

•  llMessageLinked
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。