Touch Timer



LSL PortalFunctions |Events |Types |Operators |Constants |Flow Control |Script Library |Categorized Library |Tutorials
  • 5See Also
  • 6Deep Notes

Appliance Shut Off Timer

Event: touch( integer num_detected ){ ; }

The -date=STRING is a mostly free format human readable date string such as 'Sun, 29 Feb 2004 16:21:42 -0800' or '2004-02-29 16:21:42' or even 'next Thursday'. A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers. Touch Pianist is a musical toy / instrument that allows the user to perform hard-to-play classical piano music favorites (from composers like Beethoven, Mozart, Bach, Satie, Debussy to name a few) just by tapping the rhythm of the piece's particular sound events on a computer keyboard or a touch screen.

Triggered whilst an agent is clicking the task. It will continue to be triggered until the the prim/object is stopped being clicked (it triggers multiple times).Triggered on touch start, each minimum event delay while held, and touch end.

• integer num_detected

Caveats

  • If a prim face has Shared Media enabled and the avatar's viewer supports this feature, LSL scripts will not detect touches on that face. Touches from older clients will be detected.
Touch TimerAll Issues ~ Search JIRA for related Bugs

Ge Smart Touch Timer

Examples

You can use numbers 0 through (num_detected-1) with the various llDetected... functions to get detected agent keys etc. For most purposes, it is adequate to bother only with the first detected toucher e.g. llDetectedKey(0). It is rare (but not impossible) for num_detected to be other than 1.

This next example demonstrates detecting when the owner of the object clicks-and-holds on the object for 1 second in order perhaps to access a management menu or similar, Normal brief clicks are distinguished.

Clicking and holding can't be used to call a menu since the menu will pop out continuosly.Use a flag to avoid this.

Notes

  • On clicking a prim with touch events we trigger touch_start (on first contact), touch (during) and touch_end (as released).

See Also

Events

touch_start
touch_end

Functions

llSetTouchText Set the pie menu's text for touch-action
llPassTouches Allows clicks captured by a child prim to be passed to the root as well

Deep Notes