Hello all,
Last time I posted I was asked to research and wiki the problem before coming back, I use LSL Editor 2.56 to assist me. Thank you
This is for OpenSim
I have 3 prims linked together, 1st is the start, the 2nd is the stop, and the 3rd is a board to post results to(or above not picky).
The following script is the root prim script, it starts on a single touch and stops on a double touch, it can start or stop from either 1 or 2. When it starts the timer/counter counts off the seconds in open channel until you reach the other and double touch it, at which time it is suppose to stop say the count and you finished the course.
I also placed a llregionsay on channel 25 to send the information to the board, but I cannot get the information correctly after stopping or at the board. could someone please take a look and let me know how I can fix this.
Script: Start/Stop Course Script:
// Start/Stop race course 2 prim objects(separated)1 board
integer board = 0;
integer count = 0;
float gHoldTime;
default
{
state_entry()
{
llSetText("Single Touch Start/Double Touch Stop", <0.0,1.0,0.0>, 1);
}
touch_start(integer total_number)
{
float now = llGetTime();
if (now - gHoldTime < 0.3)
{
llSay(0,"You Finshed The Course");
llSetTimerEvent(0.0);
llResetScript();
// Trigger one sequence of actions
}
else
{
llSetTimerEvent(1.0);
}
gHoldTime = now;
}
timer()
{
if (llGetTime()-gHoldTime > 0.3)
{
// llSay(PUBLIC_CHANNEL,"You Started The Course ");
llSetTimerEvent(1.0);
count ++;
board = count;
llRegionSay(25,"This is an incredibly useless program." );
llSay(0,(string) count + " Seconds ago you started the course.");
// Trigger a different sequence of actions
}
}
}