Difference between revisions of "LlSetTouch"

From Second Life Wiki
Jump to navigation Jump to search
(Let it appear a bit nicer)
Line 1: Line 1:
'''
{{LSL_Function
== THIS FUNCTION DOES NOT EXIST ==
|func_id
 
|mode=request
 
|func_sleep
* Proposed Syntax: '''LlSetTouch(key id)'''
|func_energy
This would be a nice function to limit the touch to certain specified avatars.
|func=llSetTouch
 
|sort=SetTouch
 
|p1_type=key
* Note: This function limits the possibility to touch an object to the passed key id.
|p1_name=id
Useful to prevent simultaneous clicks by different Avatars on the same moment on the same object. Can also prevent unauthorized use of an object.
|func_desc=This would be a nice function to limit the touch to certain specified avatars.
 
|return_text
* ''example:''
|spec=This limits the possibility to touch an object to the passed key id.
Useful to prevent simultaneous clicks by different Avatars on the same moment on the same object.
default
|caveats
{
|examples=<pre>
  state_entry()
default
  {
{
    llSetTouch(llGetOwner()); // only the boss may click!
state_entry()
  }
  {
  touch(integer num_detected); // if another avatar touches nothing happens!
    llSetTouch(llGetOwner()); // only the boss may click!
  {
    llSay(0, "Hi Owner!");
   }
   }
touch(integer num_detected);
{
  llSay(0, "Hi BOSS");
  }
  }
}
</pre>
|helpers
|related
|also
|notes
}}

Revision as of 06:02, 24 September 2007

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llSetTouch( key id );

This would be a nice function to limit the touch to certain specified avatars.

• key id

Specification

This limits the possibility to touch an object to the passed key id. Useful to prevent simultaneous clicks by different Avatars on the same moment on the same object.

Examples

default
{
 state_entry()
  {
    llSetTouch(llGetOwner()); // only the boss may click!
  }
 touch(integer num_detected);
 { 
   llSay(0, "Hi BOSS"); 
 }
}

Deep Notes

Signature

//function void llSetTouch( key id );