Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

selected () event!

Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
06-12-2004 11:25
Is it at all possible to get a selected () event implemented into LSL? This would be nifty.
I'm thinking, if I could somehow know which prims are selected, I could do all sorts of things, like alignment / distribution tools for ease of building, better script interfaces, the works!
Oz Spade
ReadsNoPostLongerThanHand
Join date: 23 Sep 2003
Posts: 2,708
06-12-2004 20:07
Hmm, that would be nifty, are Right Click's counted in touch() events? Might wana try that out. If they aren't counted, then yeah a selected() would be nice to have.

Edited to fix gramatical (sp) error.
_____________________
"Don't anticipate outcome," the man said. "Await the unfolding of events. Remain in the moment." - Konrad
Myria Daguerre
Junior Member
Join date: 29 Apr 2004
Posts: 6
06-14-2004 20:57
Such a system would interfere with administration. A bad script could be programmed that moved the object away or spawned a second copy of itself when someone - possibly a God - right clicked it. It would be very difficult to delete such a pest.

Melissa
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
06-14-2004 21:53
From: someone
Originally posted by Myria Daguerre
Such a system would interfere with administration. A bad script could be programmed that moved the object away or spawned a second copy of itself when someone - possibly a God - right clicked it. It would be very difficult to delete such a pest.

Melissa


Linden Gods have the ability to disable scripts and delete objects without touching them, at least from what I've heard. :D Plus, what's the point if you can do the same thing (make an object move away from Lindens or other people when they get close) with a sensor already.

I believe this would be a super-cool feature to add, a selected(), selected_start() and selected_end() would allow for cool editing abilities.

Imagine, an object that knows that its being edited and responds to commands differently during that period of time.

For example, with selected() events enabled, I can create a script to easily modify specific objects with voice commands while only in edit mode.

I shift-select a Cube and Sphere with my special buildHelper script in them:
"sidescale +z 4"
They both scale their side along the positive up axis (blue arrowhead) to 4 meters.

I shift-deselect the Sphere, deactivating voice-command on it, and Select Cube2, leaving Cube still selcted.
"alignZWith OtherCube"
Both cubes auto-align with OtherCube.
"eulerRotate <2.192, 23.12, 12.1283>"
Both cubes rotate to that rotation.

Exciting! :D

And no, the touch events don't already do this! Touch events account for left click. select() events would allow scripts to see when their object becomes selected via right-click (or left-click while in edit mode.) Selection is represented in the UI by a yellow halo around the object.

It would also be awesome if llDetected* functions worked in these too :D

==Chris