Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Problems with llSetSitText()

WindyWeather Vanalten
Registered User
Join date: 27 Nov 2006
Posts: 53
06-12-2007 14:51
I can't get SetSitText to work. I see some things that I have that set it, but none of the things that I build will work to set it. I am including a script that I"m using for a poseball. Maybe someone can see something that I"m doing wrong. The poseball works correctly, just not the llSetSitText. Thanks, - windy

From: someone

// FlipperPA's auto-transparent minimum lag pose thingy.

// STEP 1: Drop your pose into an object inventory with this script (only 1)
// STEP 2: Simply enter the text you wish to hover about the pose object below

string DISPLAY_TEXT = "Float";

// STEP 3: Hit "SAVE" below. If you change the pose, you can reset the script to re-read the pose

/////////////////////// DO NOT CHANGE BELOW ////////////////////////
string ANIMATION;
integer is_sitting;

key kAvatar = NULL_KEY;

default
{
state_entry()
{
ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
is_sitting = 0;
llSitTarget(<0,0,.1>,ZERO_ROTATION);
llSetTexture("5748decc-f629-461c-9a36-a35a221fe21f",ALL_SIDES);
DISPLAY_TEXT = llGetObjectDesc();
llSetText(DISPLAY_TEXT,<1,1,1>,1);
llSetSitText(DISPLAY_TEXT);
}

changed(integer change)
{
if(change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();
kAvatar = av;

if(av != NULL_KEY)
{
llRequestPermissions(av, PERMISSION_TRIGGER_ANIMATION);
llMessageLinked(LINK_ALL_OTHERS, 0, "stop", NULL_KEY);
llMessageLinked( LINK_ALL_OTHERS, 0, "unlink", NULL_KEY );
}
else
{
if((llGetPermissions() & PERMISSION_TRIGGER_ANIMATION) && is_sitting)
{
is_sitting = 0;
llStopAnimation(ANIMATION);
llMessageLinked(LINK_ALL_OTHERS, 0, "stop", NULL_KEY);
llMessageLinked( LINK_ALL_OTHERS, 0, "unlink", NULL_KEY );
llSetText(DISPLAY_TEXT,<1,1,1>,1);
llSetSitText( DISPLAY_TEXT );
llSetTexture("5748decc-f629-461c-9a36-a35a221fe21f",ALL_SIDES);
}
}

}
ANIMATION = llGetInventoryName(INVENTORY_ANIMATION, 0);
}

run_time_permissions(integer perm)
{
if(perm & PERMISSION_TRIGGER_ANIMATION)
{
is_sitting = 1;
llStopAnimation("sit_generic";);
llStopAnimation("sit";);
llStartAnimation(ANIMATION);
llMessageLinked(LINK_ALL_OTHERS, 0, "start", NULL_KEY);
llMessageLinked( LINK_ALL_OTHERS, 0, "link " + (string)kAvatar, NULL_KEY );
llSetTexture("f54a0c32-3cd1-d49a-5b4f-7b792bebc204",ALL_SIDES);
llSetText("",<1,1,1>,1);
}
}

on_rez(integer start_param)
{
llResetScript();
}
}


Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-12-2007 15:06
Does your object have anything in the Description field? Cuz the script does
DISPLAY_TEXT = llGetObjectDesc();
on state_entry(), so if no Description, no sitText.
WindyWeather Vanalten
Registered User
Join date: 27 Nov 2006
Posts: 53
Yes, of course....
06-13-2007 08:50
Yes, of course there is a string in the description, and the hover text, or whatever you call it, displays correctly, always. I made this change so that the most frequent change to the script would not require any change to the script, but only to the primitive.

But the Sit Text never displays correctly. It always displays "Sit Here"..
If you think you know the fix, I encourage you to take the script and try it with your own animation and see if it works. Both as a lone PoseBall and with the PoseBall linked with another object.
Thanks,
wwv
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
06-13-2007 10:03
Well, but I tried it and, without change, the description shows as the sit text in the pie menu (as well as the hover text). [edit: Well, in a linkset, you should get the root prim's sit text, if any; if the root prim doesn't have sit text, then I think you get the default "Sit Here" text. But that didn't seem to be your problem.]