Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Touch Delayed_Touch  

Delayed_Touch

Pretty self-explanatory. Perfect for anyone who wants to do a separate menu for the owner by holding their "touch" for X amount of time versus a standard click.

Category: Touch
By : Sylar Lawksley
Created: 2010-09-07 Edited: 2010-09-07
Worlds: Second Life

the Zip file

Download all files for Delayed_Touch
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Delayed_Touch_1.lsl
1 integer true_touch = 0; //Used to determine if we have completed the touch-and-hold or not.
2
3 default
4 {
6 {
7 true_touch = 0;
8 llSetTimerEvent(5.0); // How long you want the user to click-and-hold before the timed function goes off.
9 }
10
12 {
13 if(true_touch != 1)
14 {
15 llSay(0, "Nope!"); // Didn't hold long enough.
16 // Regular menu location
17 }
18 llSetTimerEvent(0.0);
19 }
20
21 timer()
22 {
23 true_touch = 1;
24 llSay(0, "Yep!"); //Held long enough, perform function!
25 // Owner menu location
26 }
27 }

Back to the Best Free Tools in Second Life and OpenSim.