2009年9月5日土曜日

llMessageLinked

Script to Send a Message

 
default
{
    touch_start(integer touched)
    { //When someone touches this, send the message "touched",

      //the number 0 and the avatar's key who touched this prim

      //to all scripts in this linkset.

 
        llMessageLinked(LINK_SET, 0, "touched", llDetectedKey(0));    
    }
}


Script to Receive the Message

 
default
{
    link_message(integer Sender, integer Number, string Text, key ID)
    {  //When this prim receives a message, say to the owner what it received.

 
        llOwnerSay("Message received from prim number " + (string)Sender
            + " within this linkset. The Message is the number "
            + (string)Number + ", the message " + Text + ", and the key of the avatar "
            + llKey2Name(ID) + ".");
    }
}

0 件のコメント:

コメントを投稿