Difference between revisions of "Who"
Jump to navigation
Jump to search
Ackley Bing (talk | contribs) (Created page with "<lsl> // Who() user-function supporting Viewer URI Name Space // http://wiki.secondlife.com/wiki/Viewer_URI_Name_Space string Who(key id) { return "secondlife:///app/agent/" …") |
m (Added {{LSL Header}} for good measure...) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{LSL Header}} | |||
A simple '[[llKey2Name]]' user-function supporting [[Viewer URI Name Space]]. | |||
== Function == | |||
<syntaxhighlight lang="lsl2"> | |||
string Who(key id) | string Who(key id) | ||
{ | { | ||
return "secondlife:///app/agent/" + (string)id + "/inspect"; | return "secondlife:///app/agent/" + (string)id + "/inspect"; | ||
} | } | ||
</ | </syntaxhighlight> | ||
== Example == | |||
<syntaxhighlight lang="lsl2"> | |||
string Who(key id) | |||
{ | |||
return "secondlife:///app/agent/" + (string)id + "/inspect"; | |||
} | |||
default | |||
{ | |||
touch_start(integer num) | |||
{ | |||
llSay(0, "Touched by " + Who(llDetectedKey(0)) + "." ); | |||
} | |||
} | |||
</syntaxhighlight> | |||
[[Category:LSL Examples]] | [[Category:LSL Examples]] |
Latest revision as of 13:37, 9 March 2023
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
A simple 'llKey2Name' user-function supporting Viewer URI Name Space.
Function
string Who(key id)
{
return "secondlife:///app/agent/" + (string)id + "/inspect";
}
Example
string Who(key id)
{
return "secondlife:///app/agent/" + (string)id + "/inspect";
}
default
{
touch_start(integer num)
{
llSay(0, "Touched by " + Who(llDetectedKey(0)) + "." );
}
}