I'm working on creating an object with a part that raises up or lowers down when a button is pressed. I've pieced it together from several other scripts, it compiles but when the command is given nothing happens.
Prim script:
// Show Hide script
integer iSwitch ;
default
{
state_entry()
{
key owner = llGetOwner();
llListen(253465,"", owner, "MENU");
}
listen (integer channel, string name, key id, string message)
{
iSwitch = !iSwitch;
if ( iSwitch == TRUE)
{
llSetPos(llGetPos() + <0,0,0.5>);
}
else if ( iSwitch == FALSE)
{
llSetPos(llGetPos() + <0,0,-0.5>);
}
}
}
Button Script:
default
{
touch_start(integer total_number)
{
llSay(253465, "MENU");
}
}