Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Set texture issues

FireDancer Steptoe
Registered User
Join date: 14 Dec 2004
Posts: 11
01-11-2005 08:28
I've made a sit pose anim ball with the show/hide option...However the script I have has a set texture pattern that looks like bricks. How do I find the pattern codes to change this. In the script it's a long list of numbers.

If anyone can help I'd really appreciate it!

Thanks
FireDancer Steptoe



P.S. Here's what the script looks like:



string anim = "laying 020";//change testmast to any animation or drop an animation in the contents then add the name

default
{
state_entry()
{ llSitTarget(<0,0,.001>, llEuler2Rot(<0,0,0> ));
llListen(0, "", "" ,"";);
}

changed(integer change)
{
if (change & CHANGED_LINK)
{
key user = llAvatarOnSitTarget();
if (user)
{
llRequestPermissions(user, PERMISSION_TRIGGER_ANIMATION);
llStartAnimation(anim);
llSetTexture("cdb565c1-59ba-3888-d650-e6a36cc60e0a", ALL_SIDES);//make the ball go invis
llStopAnimation("sit";);
}
else
{
llSetTexture("f2c05e3a-f15e-17e0-9432-1826d60f05d4", ALL_SIDES);//show the ball
llStopAnimation(anim);
llResetScript();
}
}
}
run_time_permissions(integer perms)
{
if (perms != PERMISSION_TRIGGER_ANIMATION)
{
llResetScript();
}
else
{
llStopAnimation("sit";);
}
}
listen(integer channel, string name, key id, string msg)
{
if(msg == "hide";)
{
llSetTexture("cdb565c1-59ba-3888-d650-e6a36cc60e0a", ALL_SIDES);
llSetText("", <0, 0, 1>, 1);
}
if(msg =="show";)
{
llSetTexture("f2c05e3a-f15e-17e0-9432-1826d60f05d4", ALL_SIDES);
llSetText("", <0, 0, 1>, 1);
}
}
}
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
01-11-2005 08:55
The string of numbers and letters is the key of the texture it is setting.

Replace that with the name of the texture (if it is in the contents of the ball) or the key of a texture that you prefer.

I can't get in world at the moment but I think you can arrange to get key by right-clicking the texture in your inventory, I usually put them into the objects if I must. If not, putting them in a prim and using something like

default
{
state_entry()
{
llSay(0, llGetInventoryKey(llGetInventoryName(INVENTORY_TEXTURE, 0));
}
}

Should do the trick... (apologies for typos etc.)

If you don't actually want it to change texture, you can remove all those llSetTexture(); commands, for example llSetAlpha(0.0, ALL_SIDES); and llSetAlpha(1.0, ALL_SIDES); will toggle between transparent and fully visible whilst not changing the texture at all.
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
01-11-2005 12:28
you should probably convert the script to use llSetAlpha instead of changing textures. makes it easier to retexture the ball. From script llSetAlpha(0.0, ALL_SIDES); is valid and turns a prim totally transparent. llSetAlpha(1.0, ALL_SIDES), will make it completely opaque again. If your sit ball is more than one prim then we have llSetLinkAlpha(ALL_SIDES, 0.0, ALL_SIDES); to turn an entire linked object transparent. and llSetLinkAlpha(ALL_SIDES, 1.0, ALL_SIDES); to turn it opaque (visible).
_____________________
FireDancer Steptoe
Registered User
Join date: 14 Dec 2004
Posts: 11
Thankyou!
01-12-2005 16:16
Adding the texture to the object and changing the name worked wonderfully!!

Thank You very much!!

FireDancer