llMessageLinked

From Second Life Wiki
Revision as of 21:51, 11 February 2007 by Radslns Hutchence (talk | contribs)
Jump to navigation Jump to search

  Either 'func_desc' or 'return_type' & 'return_text' must be defined

(Please use 'return_text' & 'return_type' or 'func_desc' to summarize the functions actions.)

Summary

Function: llMessageLinked( integer linknum, integer num, string str, key id );
• integer linknum
• integer num
• string str
• key id

Sends num, str, and id to members of the link set (LINK_ROOT sends to root task in a linked set,
LINK_SET sends to all tasks,
LINK_ALL_OTHERS to all other tasks,
LINK_ALL_CHILDREN to all children,
LINK_THIS to the task the script it is in)

Examples

<lsl> default{ // assumptions // object name: LSLWiki // script name: _lslwiki

    state_entry() {
      llMessageLinked(LINK_THIS,0,llGetScriptName(),NULL_KEY)
    }
    link_message(integer sender_num, integer num, string msg, key id) {
      llOwnerSay(msg);
      // the owner of object LSLWiki will hear
      // LSLWiki:_lslwiki
    }    

}

</lsl>

Notes

Using llMessageLinked in a single prim object allows developers to mitigate some LSL limits by, 
breaking up functionality between cooperating scripts and synchronizing actions. 
When you do this, be extremely careful not to create infite loops based a script reacting to a 
linked message by sending a linked message, to which it reacts.

Deep Notes

Search JIRA for related Issues

Signature

function void llMessageLinked( integer linknum, integer num, string str, key id );