Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Multiple touch_ends from one touch_start?

Russell Hansen
Texi pets are here!
Join date: 11 Apr 2006
Posts: 107
07-02-2006 16:06
Ok I'm having a little trouble trying to use touch_end events.

I have a counter in touch_start, and touch_end and am display both when touch_end triggers.

In my touch_end event, I am also using llSleep.

My problem is, every now and then, I am getting 2 touch_end events firing instead of 1. My toucher goes something like this, where total_touch and total_end are the number of touches passed into the event, and time is the time between touch start and touch end.

total_touch=1 total_end=1 touch_start#1 touch_end#1 time .2
total_touch=1 total_end=1 touch_start#2 touch_end#2 time .8
total_touch=1 total_end=1 touch_start#3 touch_end#3 time .11
total_touch=1 total_end=1 touch_start#3 touch_end#4 time 2.88

It's almost as if the sleep is somehow making the even repeat.

I could swicth to a timer event instead of sleep, but I anted to stop further touches and activity during the sleep time. Anyone have an ideas?


Thanks. Russell.
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
07-02-2006 22:54
Change states to one without a touch_* event.

Whilst the script is asleep it doesn't process, the event queue continues to grow though, because that's handled outside the script, the script just processes it. The behaviour you're seeing it pretty much the expected behaviour I'm afraid.
_____________________
Eloise's MiniMall
Visit Eloise's Minimall
New, smaller footprint, same great materials.

Check out the new blog
Russell Hansen
Texi pets are here!
Join date: 11 Apr 2006
Posts: 107
07-02-2006 23:07
Thanks for the reply.

Changing states may be one way around the problem, although that's going to fragment my code as I'm in the middle of all sorts of things when the sleep occurs.

I don't see how that explains what's happening though. I understand the script is paused while sleeping, but events aren't, but there is nothing triggering further touch events that I know of.

There are 2 touch_end events triggering with only one touch_start, and with me only physically touching the object. I have a visual indicator when the sleep is finished, and the whole touch_end finishes not long after.

How can it be possible to have mis-matched touch_ends? Unless there's some wierd delay and the touch_end is actually triggering before the touch_start, although the debug statements I have in don't show a mismatch this way, but then the llOwnerSay isn't exactly sequential either.
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
07-03-2006 10:58
This has happened to me, you can sometimes get two touch_starts for a single touch as well.
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Russell Hansen
Texi pets are here!
Join date: 11 Apr 2006
Posts: 107
07-03-2006 13:56
Well out of the many tests I've done so far, it's only been extra touch_ends. I've worked around that problem by simply ignoring ends without matching starts. Mtultiple starts will be a different problem, but hopefully whatever the bug is only does 1 or the other.