Difference between revisions of "Touch end"

From Second Life Wiki
Jump to navigation Jump to search
m
(same again)
Line 17: Line 17:
     {
     {
         llOwnerSay((string)(llGetTime() - t) + " seconds between touch_start and touch_end");
         llOwnerSay((string)(llGetTime() - t) + " seconds between touch_start and touch_end");
    }
}</lsl><lsl>// A minor concern to take note of...
default
{
    touch_start(integer nd)
    {
        llSay(0, "You just started touching me so I'm going to the other state...");
        state other;
    }
}
state other
{
    touch_end(integer nd)
    {
        llSay(0, "The touch that brought you here just ended so I'm off...");
        state default;
     }
     }
}</lsl>
}</lsl>

Revision as of 09:17, 30 January 2010

Description

! Event: touch_end( integer num_detected ){ ; }

Triggered when agent stops clicking on task

• integer num_detected

Caveats

Important Issues

~ All Issues ~ Search JIRA for related Bugs
   Server drops first touch event when a script returns to a state with a touch_start handler

Examples

You can use numbers 0 through num_detected - 1 to get detected agent keys: <lsl>float t;

default {

   touch_start(integer num_detected)
   {
       t = llGetTime();
   }
   touch_end(integer num_detected)
   {
       llOwnerSay((string)(llGetTime() - t) + " seconds between touch_start and touch_end");
   }

}</lsl><lsl>// A minor concern to take note of...

default {

   touch_start(integer nd)
   {
       llSay(0, "You just started touching me so I'm going to the other state...");
       state other;
   }

} state other {

   touch_end(integer nd)
   {
       llSay(0, "The touch that brought you here just ended so I'm off...");
       state default;
   }

}</lsl>

See Also

Events

•  touch_start
•  touch

Functions

•  llPassTouches

Deep Notes

Issues

All Issues

~ Search JIRA for related Issues
   Server drops first touch event when a script returns to a state with a touch_start handler

Signature

event void touch_end( integer num_detected );