Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do I change Params on the hollowed face of a Cube but not other faces

dana Archer
Registered User
Join date: 10 May 2005
Posts: 8
01-24-2009 05:25
Hi

I hope someone can help me. I am a complete novice at scripting. I have looked on the wiki & library and couldnt find the exact answer to what integer the hollow face would be(or its there and i had a very blonde moment and couldnt see it lol)


I would like to be able to change the color (a set of about 25 colors but which i could expand or contract for different objects), brightness and transparency (clear, 25,50,75 solid) on either the hollowed face of a prim or one of the other faces invidually as well as ALL_SIDES by use of a dialog menu.

I did a script for allsides but cant work out how to get the inside face and i had problems with the script i had modded to change colors because i wanted to limit the colors and use my names for the colors and i hadnt gotten to the point of trying to combine them:-(

And once i got that i was hoping to be able to have another script which allows the owner of the object to change the color and brightness on the all or individually, the prims in a linked set,


thanks in advance
dana :-)
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
01-24-2009 06:25
you need to know the sides numbers of the prim. when a prim is hollow, some or all of the face numbers are different from when it wasn't hollow. same with pathcut. that's because when you path-cut and/or hollow, more faces are created. i wish it didn't change the numbers, but this is sl, lol. using select texture in the edit window, select the face you want to change and then in the debug menu hit selected texture info. not sure if it's in a sub-menu or not as i'm not logged in to check. i usually use the quick key which is ctrl+alt+shift+t

it will tell you in chat what face and some other info, i think the size of the texture that's on it and whether it's opaque or alphaed
Innula Zenovka
Registered User
Join date: 20 Jun 2007
Posts: 1,825
01-24-2009 09:14
The actual section of the wiki that discusses this is not, as one might expect, "face" but http://www.lslwiki.net/lslwiki/wakka.php?wakka=side. If you look at that page, you'll find links to some useful functions. The inside of a hollow cube is side 5 -- all of it, which is rather annoying sometimes if you're trying to texture it.

To answer your specific question, you would alter the inside of a cube by using something like
CODE
llSetColor(<1.00,0.00, 0.00>, 5);

If you want to change more than one side but not all, you have to set them one at a time; sometimes it's quicker to change ALL_SIDES to the colour/texture you want most of them to be and then change one or two again, individually. Or you can do them all at once (you still have specify them individually, but this way they change simulaneously) using llSetPrimitiveParams or llSetLinkPrimitiveParams.


Something I discovered by accident the other day, which is maybe worth knowing; if you colour or texture the inside of a hollow prim, then get rid of the hollow and then hollow it out again, you lose the texturing -- I suppose because the inside didn't exist for a while. And if you set the colour/texture in state_entry(), that won't get called again unless you make it happen.

The work-round I found was to use
CODE
changed(integer change) {
if (change & CHANGED_SHAPE)
//do stuff
}
to check if the prim had filled in and hollowed out again.

And if you want to change some, but not all, prims in the linkset, I suggest you look at /54/06/265951/1.html, where I received some very helpful answers when I asked how to do this.
dana Archer
Registered User
Join date: 10 May 2005
Posts: 8
Thankyou for the help
01-25-2009 02:21
Thanks to both Innula Zenovka & Ruthven Willenov, your information has been most helpful.

Now lets hope i can actually produce a workable script :-)