Difference between revisions of "LlInstantMessage"

From Second Life Wiki
Jump to navigation Jump to search
Line 41: Line 41:
|also_functions=
|also_functions=
{{LSL DefineRow||[[llOwnerSay]]|}}
{{LSL DefineRow||[[llOwnerSay]]|}}
{{LSL DefineRow||{{LSLG|llWhisper}}|Sends chat limited to 10 meters}}
{{LSL DefineRow||[[llRegionSay]]|Sends chat region wide}}
{{LSL DefineRow||{{LSLG|llSay}}|Sends chat limited to 20 meters}}
{{LSL DefineRow||[[llWhisper}}|Sends chat limited to 10 meters}}
{{LSL DefineRow||{{LSLG|llShout}}|Sends chat limited to 100 meters}}
{{LSL DefineRow||[[llSay]]|Sends chat limited to 20 meters}}
{{LSL DefineRow||[[llShout]]|Sends chat limited to 100 meters}}
|also_tests
|also_tests
|also_articles
|also_articles

Revision as of 23:04, 22 May 2007

{{LSL_Function |func_id=118|func_sleep=2.0|func_energy=10.0 |func=llInstantMessage |p1_type=key|p1_name=user|p1_desc |p2_type=string|p2_name=message|p2_desc |func_desc=Sends an Instant Message specified in the string message to the user specified by key. |return_text |spec |caveats=**For applications where this is problematic, it's possible to place the call to llInstantMessage in a child script and pass the information to that script via other means.

  • The message sent can not be longer than 1024 bytes.

|examples= Tell the owner somebody touched the object:

key owner;

default {

    on_rez(integer start_param)
    {
        owner=llGetOwner();  // get the key of the objects owner.
    }
    touch_start(integer total_num)
    {        
        llInstantMessage(owner,llKey2Name(owner)+", " + (string)total_num +" Avatar(s) touched me!");
    }
}

Send a confirmation to the Avatar that touches an object without spamming other Avatars:


default {

    touch_start(integer total_num)
    {        
        llInstantMessage(llDetectedKey(0),"You have been registered!");
    }
}

|helpers |also_functions= |-style="vertical-align:top;" | style="color:gray;" |•  | llOwnerSay | style="color:gray;" | | | |-style="vertical-align:top;" | style="color:gray;" |•  | llRegionSay | style="color:gray;" | – | Sends chat region wide | {{LSL DefineRow||[[llWhisper}}|Sends chat limited to 10 meters}} |-style="vertical-align:top;" | style="color:gray;" |•  | llSay | style="color:gray;" | – | Sends chat limited to 20 meters | |-style="vertical-align:top;" | style="color:gray;" |•  | llShout | style="color:gray;" | – | Sends chat limited to 100 meters | |also_tests |also_articles |also_events |notes=Instant Messaging has the benefit of allowing communication from an object to an avatar anywhere in the Grid. The downside is that an object cannot receive an Instant Message, therefore an avatar cannot send an Instant Message to an object. It's a one-way communication avenue. Also, the two-second script delay can be considered a downside in some applications. |cat1=Communications |cat2=Instant Message |cat3 |cat4 }}