Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Tactile Button (Is There a Better Way?)

Dragger Lok
(loading ...)
Join date: 10 Sep 2006
Posts: 228
08-08-2008 10:25
Been wanting for a long time to put a tactile response in buttons, thought of this way of doing it- now the only buttons I have that do respond to touch wait for a message back from the prim to switch the color back ... to me that's alot of chit chat to make a button blink ... will add a sound trigger but this is a hud and it's bad enough my head swings all over clicking on a hud- no need to be making clicking sounds too.

The question is though- is there a prescribed way, template, a "this is how we all do it fool"?


CODE

llSetColor(<0.4, 0.4, 0.0>, ALL_SIDES);
llSleep(0.05);
llSetColor(<0.9, 0.9, 0.0>, ALL_SIDES); //basically returns it to the color it started with
Deanna Trollop
BZ Enterprises
Join date: 30 Jan 2006
Posts: 671
08-08-2008 11:30
I do something similar with a HUD GUI, though I change the texture momentarily, and just use the built-in 0.2 sec. delay instead of a sleep.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
08-08-2008 12:19
You could switch back on the touch_end event, that way the prim stays colored if the person keeps the mouse button down. Probably won't make much difference in 99% of the cases, and handling an extra event may add more lag than sleeping or just using the 0.2s delay as Deanna mentioned.