Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetTexture on 2 sides

Ikonn Giano
Registered User
Join date: 15 Dec 2007
Posts: 126
11-13-2008 12:57
Can sombody tell me how to set texture for 2 sides? say like 0 and 5 on a box this is the default line in the code


llSetTexture(texture_name, 4);


Thank You!!!
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
11-13-2008 13:42
the last index in that call is the side you're texturing. so in that case change the 4 to 0, and then do the call again but change it to 5. IE:

llSetTexture(texture_name, 0);
llSetTexture(texture_name, 5);


now you could do it once by creating a list and running it in a loop, but it's probably too much code for a simple task. i don't have time to give an example of that if that's what you would rather do, maybe someone else will come along and do it
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
11-13-2008 15:33
You can make multiple calls simultaneously using llSetPrimitiveParams with multiple sets of PRIM_TEXTURE options.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
11-13-2008 16:50
Basic script for setting texture on 2 faces from texture in prim inventory:

CODE

string texture;

default {
state_entry() {
texture = llGetInventoryName(INVENTORY_TEXTURE, 0);
}
touch_start(integer n) {
llSetPrimitiveParams([
PRIM_TEXTURE, 0, texture, <1, 1, 0 >, <0, 0, 0 >, 0,
PRIM_TEXTURE, 5, texture, <1, 1, 5 >, <0, 0, 5 >, 0]);
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Ikonn Giano
Registered User
Join date: 15 Dec 2007
Posts: 126
11-13-2008 20:04
Thanks Ruthven and everyone else that worked just fine :)