These forums are CLOSED. Please visit the new forums HERE
Detecting touch within a time frame? |
|
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
05-06-2007 11:49
I'm a bit stumped as to how to go about this. I want to register a touch on my object within a certain time-frame. that is; the object says "Touch me" and the user has x seconds to touch the object. llSleep won't work because it halts the entire script and the touch_start event (while registering) won't trigger until the sleep finishes out.
_____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |
|
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
|
05-06-2007 11:52
I'd say your situation is perfect for an llSetTimerEvent();
OR You could grab a llGetUnixTime() both at the beginning of the "touch-me" period and at the first touch...and if the time elapsed is within your limitation, then o.k. I would assume, however, that you want to change the characteristics of the box after time expiration (say, take the "Touch Me!" away), which would indicate wanting a llSetTimerEvent() and a timer(). _____________________
--AeonVox--
Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music. |
|
Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
|
05-06-2007 12:32
I'd say your situation is perfect for an llSetTimerEvent(); OR You could grab a llGetUnixTime() both at the beginning of the "touch-me" period and at the first touch...and if the time elapsed is within your limitation, then o.k. I would assume, however, that you want to change the characteristics of the box after time expiration (say, take the "Touch Me!" away), which would indicate wanting a llSetTimerEvent() and a timer(). unfortunately I'm using a timer event to generate the "Touch me" call on a periodic basis :\ I'll have to mess with the llGetUnixTime() command to do a time stamp comparison. _____________________
My SLExchange shop
Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not. The function is working perfectly fine. It's just not working the way you wanted it to work. |