In my furniture I have embedded poses in a pillow. For this I am using a multipose sit script, which I bought. The avi sits and gets a menu with several poses to choose from. That works fine. Besides that, I have two regular poseballs in this item for a couples cuddle pose. I am using poseballs, so that avis can move the poseballs easily to fit their avi sizes. These poseballs use a regular sit script (pasted below) and can be hidden with a chat command /22 hide.
The problem is that the bought multipose script seems to reset the entire item to default (state_entry, actually back to 'react()'). So when the regular poseballs are hidden with the chat command, but when an avi sits on the pillow with the multipose script, the regular poseballs become visible again. I think this can be solved in the regular poseball script, but I don't know how.
What I want is that the item/script reset (triggered by the multipose script) doesn't make the couples poseballs visible again. These poseballs should remain invisible when the owner used the chat command.
Can anyone help please? Here's the regular poseball script:
// Variables
string gTitle = "F"; // Title in Hovertext
integer use_voice = TRUE; // If set to true, you can hide/show the poseball via chat
integer gChannel = 22; // Channel on which the poseball listens to hide/show-commands
integer listenHandle;
integer masterswitch = TRUE;
integer visible = TRUE;
float base_alpha = 0.3; // Base-Visibility if shown
key trigger; // Agent that sits on the poseball
// functions
react()
{
key avatar = llAvatarOnSitTarget();
if(avatar != NULL_KEY)
{
llRequestPermissions(avatar, PERMISSION_TRIGGER_ANIMATION);
hide();
}
else
{
trigger = NULL_KEY;
show();
}
}
show()
{
visible = TRUE;
llSetText(gTitle, <1.0,1.0,1.0>,1.0);
llSetAlpha(base_alpha, ALL_SIDES);
}
hide()
{
visible = FALSE;
llSetText("", <1.0,1.0,1.0>,1.0);
llSetAlpha(0.0, ALL_SIDES);
}
default
{
state_entry()
{
if(use_voice)
listenHandle = llListen(gChannel, "", "", ""
;llSitTarget(<1.31,-0.30,-0.36>, ZERO_ROTATION);
react();
}
changed(integer change)
{
if(change & (CHANGED_LINK | CHANGED_INVENTORY))
{
react();
}
}
run_time_permissions(integer perm)
{
key avatar = llAvatarOnSitTarget();
trigger = avatar;
if((llGetPermissionsKey() == avatar) && (llGetPermissions() & PERMISSION_TRIGGER_ANIMATION))
{
string anim = llGetInventoryName(INVENTORY_ANIMATION, 0);
if(llGetInventoryType(anim) == INVENTORY_ANIMATION)
{
list anims = llGetAnimationList(avatar);
integer t = llGetListLength(anims);
if(t)
{
integer i;
do
{
llStopAnimation(llList2String(anims, i));
} while(++i < t);
}
llStartAnimation(anim);
}
}
}
listen(integer channel, string name, key id, string message)
{
if(llStringLength(message) == 4)
{
message = llToLower(message);
if(message == "show"

{
masterswitch = TRUE;
if(llKey2Name(trigger) == ""

show();
}
else if(message == "hide"

{
masterswitch = FALSE;
hide();
}
else
return;
//llMessageLinked(LINK_ALL_OTHERS, 99, message, ""
;}
}
}