Difference between revisions of "Link message"

From Second Life Wiki
Jump to navigation Jump to search
Line 8: Line 8:
|spec
|spec
|caveats
|caveats
|examples
|examples=
<pre>
//This is just an example script, you shouldn't handle touches within in 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!");
    }
}
</pre>
|helpers
|helpers
|also_header
|also_header
|also_events
|also_events
|also_functions
|also_functions={{LSL DefineRow||[[llMessageLinked]]}}
|also_articles
|also_articles
|also_footer
|also_footer
|notes
|notes=A script can hear its own link messages.
|mode
|mode
|cat1=Link
|cat1=Link

Revision as of 12:53, 28 March 2007

Description

Event: link_message( integer sender_num, integer num, string str, key id ){ ; }

Triggered when task receives a link message via llMessageLinked library function call

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

Examples

//This is just an example script, you shouldn't handle touches within in 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!");
    }
}

Notes

A script can hear its own link messages.

See Also

Functions

•  llMessageLinked

Deep Notes

Signature

event void link_message( integer sender_num, integer num, string str, key id );