Difference between revisions of "Touch start"

From Second Life Wiki
Jump to navigation Jump to search
(Undo revision 50320 by Valentino Tendaze (Talk) wastes bytecode (the LSL compiler sucks))
(<lsl> example)
Line 8: Line 8:
|caveats
|caveats
|examples=You can use numbers 0 through num_detected - 1 to get detected agent keys:
|examples=You can use numbers 0 through num_detected - 1 to get detected agent keys:
<pre>
<lsl>default
default
{  
{  
     touch_start(integer num_detected)
     touch_start(integer num_detected)
Line 17: Line 16:
             llWhisper(0, "Touched by " + llKey2Name(llDetectedKey(i)));
             llWhisper(0, "Touched by " + llKey2Name(llDetectedKey(i)));
     }
     }
}
}</lsl>
</pre>
|helpers
|helpers
|also_header
|also_header

Revision as of 02:52, 23 January 2008

Description

Event: touch_start( integer num_detected ){ ; }

Triggered by the start of agent clicking on task

• integer num_detected Number of agents detected touching during the last clockcycle

Caveats


Examples

You can use numbers 0 through num_detected - 1 to get detected agent keys: <lsl>default {

   touch_start(integer num_detected)
   {
       integer i = 0;
       for(; i<num_detected; ++i)
           llWhisper(0, "Touched by " + llKey2Name(llDetectedKey(i)));
   }

}</lsl>

See Also

Events

•  touch
•  touch_end

Functions

•  llPassTouches

Deep Notes

Signature

event void touch_start( integer num_detected );