Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

variable success "touching" with left_mouse_click

ashtangajoy Kanya
Registered User
Join date: 27 Jan 2009
Posts: 11
04-01-2009 09:53
I am building some linked prims to show a swinging pedulum - two vertical cones to support a horizontal cylinder bar, from which would swing a double pendulum. The aim is to start by "touching" the top part of pendulum. My first attempts to link these prims failed bacause I could not get an alt-left click working - but succeeded using control and rotation mode. When all was linked and scripted I found a left click on the vertical support cones would activate a touch but it was impossible to register a "touch" on the pendlum cylinders. I found the only way was to - edit linked parts- right click on pendulum cylinder, select edit and then touch ! Even this was variable in its success. Is there something special to be done to make a mouse click touch work? It might be worth pointing out that when motion does occur it is terribly slow and pretty useless but I might replace calculations with pre generated positions etc.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
04-01-2009 10:27
From: ashtangajoy Kanya
Is there something special to be done to make a mouse click touch work?
See following for pass touches
http://www.lslwiki.net/lslwiki/wakka.php?wakka=llPassTouches
It may have something to do with it:)
_____________________
From Studio Dora
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
04-01-2009 17:10
First, it'd be good to know whether you're using the touch() event or the touch_start() event to trigger touches. If you're only using touch(), then it's possible you're triggering the event multiple times with one touch, causing the pendulum to start and stop at the same time.

touch() is like a "while" statement. While the left-mouse button is clicked, the event is triggered repeatedly. Lately, the speed of LSL has improved such that a seemingly quick click, registers as multiple clicks.

touch_start() triggers the event only once per click (though I can't remember if it's on the up or down stroke).

If that's not the problem, then it'd be helpful to know the structure of your script(s) within the linked set. Is there one script in a root prim, or multiple scripts in child prims? And do the scripts communicate at all?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-01-2009 20:03
I'm guessing from your description that the pendulums have a touch to start script in them?

if so you'll want to change to a linked message handler, and use a single touch script in the root prim to send a message to both.

in this scenario pass touches would only help if one of the pendulums was the root prim and the other not (which is the one that would need that command)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -