Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

need help with hide/show poseballs

Kalynn Carnell
Registered User
Join date: 21 Feb 2007
Posts: 3
05-18-2007 22:31
I'm fairly new to scripting, but I have managed to figure out how to change the values for offset and rotation. I'm ready to try something a little more challenging....

Here's what I'm having a problem with. I built a sofa, and I'd like to add some poseballs in it...normally, I know, just put the balls into the sofa, link them, and adjust the offset...but then I have strange little lumps in my sofa cushion. What I would like to find is a script that will show or hide the balls when I click anywhere on the sofa, instead of typing the usual "show/hide" voice command. I have been searching for something like this for the past week. Does anyone know where I might find this type of script?
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
05-18-2007 23:46
basic switch
CODE


integer ON;

default
{
touch_start(integer t)
{
if (!ON)
{
// insert code for on/ show here
ON = TRUE;
}
else
{
// insert code of off / hide here
ON = FALSE;
}
}



you can replace the listen event in a standard poseball script with this touch event + a golobal variable (in this case integer ON; ) , should be some simple copy and pasting

oh let me clarify something, the phrase .. !ON means not ON in english or ON == FALSE as a direct comparison :)
Kalynn Carnell
Registered User
Join date: 21 Feb 2007
Posts: 3
05-19-2007 10:15
Thanks, Osgeld...I'll try this...hopefully it will work.