Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

touch

Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 04:57
What's the difference between touching something (touch_start in the script) with a left click or right click then "touch" in the pie? Shouldn't they be the same and give the same results?
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
06-20-2008 05:00
There is no difference. both actually *do* the same.
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 05:06
From: Squirrel Wood
There is no difference. both actually *do* the same.


I have some doors that used to work fine till a recent update, not sure which one. They work great through the left click and pie touch but when right clicked they open and close way too fast, almost like the timer is set differently or something.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-20-2008 06:27
Your door might be using a touch event instead of touch_start, using that to decide how long to hold the door. Left-click will keep giving you touch events for as long as the button is down, the right-click version will only fire that momentarily.
_____________________
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 07:39
From: Viktoria Dovgal
Your door might be using a touch event instead of touch_start, using that to decide how long to hold the door. Left-click will keep giving you touch events for as long as the button is down, the right-click version will only fire that momentarily.

Thanks
I'm at work so I'll check that when I get home but I'm sure it's a touch_start.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-20-2008 07:52
Ok, if you want to check on any strangeness in how your mouse is reacting, you can watch the events with a skeleton script. If all is well, you should get only one each of touch_start and touch_end for either kind of click, number of touch events should vary depending on how (and how long) you click.

CODE

default
{
touch_start(integer total_number)
{
llOwnerSay("Touch start.");
}

touch(integer total_number)
{
llOwnerSay("Touch.");
}

touch_end(integer total_number)
{
llOwnerSay("Touch end.");
}
}
_____________________
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 08:10
From: Viktoria Dovgal
Ok, if you want to check on any strangeness in how your mouse is reacting


So it could be my mouse and not the script? I haven't gotten a new mouse recently and the issue started after one of the viewer or server updates.
I'll get someone else to open something with a left click and see what happens. If that doesn't help I'll send you the script to see if I'm missing something.
Thanks for your help
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-20-2008 08:30
From: Max Pitre
So it could be my mouse and not the script?

I am almost thinking it would have to be something odd happening with the hardware or viewer on your end, if there are really only touch_start events in use. You should only get one of those no matter how you click, and the script would never know the difference. That's what the baby script might be able to tell you, if the switch is getting tired and has started bouncing, or something along those lines.

Good luck with this, and sure, will be happy to look, sometimes all it takes is a fresh pair of eyes.

(following on this, yes I'm kind of assuming that maybe LL got something right and something that once had a sluggish response got better. bummer if you were depending on that sluggishness though :p )
_____________________
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 08:58
From: Viktoria Dovgal

(following on this, yes I'm kind of assuming that maybe LL got something right and something that once had a sluggish response got better. bummer if you were depending on that sluggishness though :p )


There is a 10 second timer that works through the pie touch but on left click the doors open and close within a half second.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
06-20-2008 09:06
O RLY? Is this one of the scripts that closes the door early on a second touch? If so, that would hint that too many clicks might indeed going out from the left button.
_____________________
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-20-2008 10:28
From: Viktoria Dovgal
O RLY? Is this one of the scripts that closes the door early on a second touch? If so, that would hint that too many clicks might indeed going out from the left button.

That's what it does, closes on the second touch. I'll take out the second touch and see what it does.
Thanks for your help!
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
06-20-2008 17:24
touch and touch_start are not the same.

When using <touch>, the simulator will trigger the event as fast as possible, repeatedly while the mouse button is clicked. In a fast sim, a single, slow click could trigger several <touch> events. Although, a pie-menu "touch" should still only trigger one event.

When using <touch_start>, a single click is a single event trigger.

<touch> could be problematic at times, due to lag or a poor internet connection. It's possible that a click can be registered through the <touch> event, start a succession of event triggers, but the "un-click" is delayed due to lag. That would hang the script in the <touch> event until the click-cue clears.
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
06-22-2008 14:16
another thing you might want to look at and be careful with is touch_start in state changes. This is common in most door scripts. Place this in a block click and hold on the block. then move your mouse around. Then replace the touch_start with a touch_end and problem solved. Sometimes those touch_start can get triggered in both states if a person moved their mouse during the click.

CODE

default
{
touch_start(integer total_number)
{
llSay(0, "default Touched_Start");
state another;
}
}

state another
{
touch_start(integer total_number)
{
llSay(0, "another Touched_Start");
state default;
}
}
Max Pitre
Registered User
Join date: 19 Jul 2006
Posts: 370
06-22-2008 16:06
Thanks all. I got it where I want with a simple llSleep. Works great now