Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Set texture on 2 faces only

Teizus Miles
Registered User
Join date: 4 Jan 2008
Posts: 6
01-16-2008 14:24
Guess this is a stupid question but i just can“t figure it out...

I want to change this:

llSetTexture(name, ALL_SIDES);

Two only set texture on two faces (0 and 5)

I tryed this:

llSetTexture(name, 0/5);

But it will only change the texture on 0

Can someone help me with this?

Thanks,
Teizus
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-16-2008 14:51
Just make two calls:

CODE

llSetTexture(name, 0);
llSetTexture(name, 5);
Teizus Miles
Registered User
Join date: 4 Jan 2008
Posts: 6
01-16-2008 14:57
Thank you so much, that worked just fine.

Regards,
Teizus
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
01-16-2008 15:07
/me is curious, not being near the grid and able to test it myself, if you could also do two texture sets with one call to llSetPrimitiveParams..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-16-2008 15:16
I believe so. That might work well if script delay is going to become an issue. It is a little more complicated though.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-16-2008 16:54
From: Meade Paravane
/me is curious, not being near the grid and able to test it myself, if you could also do two texture sets with one call to llSetPrimitiveParams..

You can't AND together faces using any of the LSL functions including llSetPrimitiveParameters.
_____________________
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
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-16-2008 17:07
From: Jesse Barnett
You can't AND together faces using any of the LSL functions including llSetPrimitiveParameters.

I'm pretty sure Meade was talking about doing something like:

CODE

integer firstSide = 0;
integer secondSide = 5;
llSetPrimitiveParams([
PRIM_TEXTURE, firstSide, texture, repeats, offset, rotation,
PRIM_TEXTURE, secondSide, texture, repeats, offset, rotation
]);
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-16-2008 17:15
From: Hewee Zetkin
I'm pretty sure Meade was talking about doing something like:

CODE

integer firstSide = 0;
integer secondSide = 5;
llSetPrimitiveParams([
PRIM_TEXTURE, firstSide, texture, repeats, offset, rotation,
PRIM_TEXTURE, secondSide, texture, repeats, offset, rotation
]);

Edit: Deleted stupid mistake here!
_____________________
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
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
01-16-2008 17:49
Yes, you certainly can!
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-16-2008 17:51
From: Tyken Hightower
Yes, you certainly can!

COOL!!!! But now I have to log back in to check it:(



Yep! check that one up to me being brain dead.
_____________________
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
Gaye Andrew
Registered User
Join date: 14 Sep 2007
Posts: 1
Gaye Andrew
01-16-2008 18:40
just drag and drop the textures on to the sides you want it on.. That simple no need for scripts at all there lol DOH!
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
01-16-2008 18:42
this is how i learned


Prim side numbering
Prim count 1-9

CODE

integer listenkey;
integer LinkNumber;

string nought = "05fff99d-c061-f4bc-3a73-794e4c764e71";
string one = "1589a23c-47a0-9326-b43e-971e21d27f54";
string two = "6015e61e-7f4b-1fc6-e92e-dd7f8737192d";
string three = "1f4c3534-8116-1b5f-1db0-455ade42d044";
string four = "138a986d-f1ef-a995-26b4-ec3014d613c3";
string five = "ba243aec-2f16-83a5-be6b-0ec45c735b31";
string six = "76ea1ef0-a78b-934f-4f74-f7eb3401ed6c";
string seven = "8fc340ec-398a-baa0-4e25-03ca1b7b909a";
string eight = "4dbffb7c-05b1-cd76-59d9-0bfeac4fd495";
string nine = "d02525d2-c17a-7f4f-9eb2-9cb24e53e262";


// ----------------------------------------------------

//function
// ----------------------------------------------------
nameFaces()
{
llSetLinkColor(LINK_SET, <1.0,1.0,1.0>, ALL_SIDES);
llSetLinkTexture(LINK_SET, nought, 0);
llSetLinkTexture(LINK_SET, one, 1);
llSetLinkTexture(LINK_SET, two, 2);
llSetLinkTexture(LINK_SET, three, 3);
llSetLinkTexture(LINK_SET, four, 4);
llSetLinkTexture(LINK_SET, five, 5);
llSetLinkTexture(LINK_SET, six, 6);
llSetLinkTexture(LINK_SET, seven, 7);
llSetLinkTexture(LINK_SET, eight, 8);
llSetLinkTexture(LINK_SET, nine, 9);
}
// ----------------------------------------------------

//function
// ----------------------------------------------------
numberLinks()
{
LinkNumber = llGetLinkNumber();
llSetLinkPrimitiveParams(LINK_SET, [PRIM_COLOR, ALL_SIDES, <1.0,1.0,0.0>, 1.0]);
llSetLinkTexture(0, nought, ALL_SIDES);
llSetLinkTexture(1, one, ALL_SIDES);
llSetLinkTexture(2, two, ALL_SIDES);
llSetLinkTexture(3, three, ALL_SIDES);
llSetLinkTexture(4, four, ALL_SIDES);
llSetLinkTexture(5, five, ALL_SIDES);
llSetLinkTexture(6, six, ALL_SIDES);
llSetLinkTexture(7, seven, ALL_SIDES);
llSetLinkTexture(8, eight, ALL_SIDES);
llSetLinkTexture(9, nine, ALL_SIDES);

}

// ----------------------------------------------------




// ----------------------------------------------------

default{

touch_start( integer num )
{
if ( llDetectedKey(0) == llGetOwner() )
{
listenkey = llListen( 8192, "", llGetOwner(), "" );
llSetTimerEvent(60);
llDialog( llDetectedKey(0), "Number Linked Prims :",
[ "Name Faces", "Link Numbers" ], 8192 );
}
}
timer()
{
llListenRemove( listenkey );
llSetTimerEvent( 0 );
}
listen ( integer channel, string name, key id, string message )
{
llListenRemove( listenkey );
if ( message == "Name Faces" )
{
llMessageLinked( LINK_SET, 0 , "Name Faces" , NULL_KEY );
nameFaces();
}
if ( message == "Link Numbers" )
{
llMessageLinked( LINK_SET, 0 , "Link Numbers" , NULL_KEY );
numberLinks();
}
}
}
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
01-16-2008 19:14
From: Gaye Andrew
just drag and drop the textures on to the sides you want it on.. That simple no need for scripts at all there lol DOH!


what happens when you want it to change textures when someone touches it and your not around DOH!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-16-2008 19:42
From: Osgeld Barmy
what happens when you want it to change textures when someone touches it and your not around DOH!

Plus, this is the scripting forum. We never ever do anything the easy way. Much more fun spending hours doing it with a script :D
_____________________
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
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
01-16-2008 20:05
From: Osgeld Barmy
what happens when you want it to change textures when someone touches it and your not around DOH!
why would i want it to change textures when i'm not around? i wouldn't even see it DOH! an nobody better be touchin my stuff when i'm not around neither lolz
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-16-2008 20:14
From: Qie Niangao
why would i want it to change textures when i'm not around? i wouldn't even see it DOH! an nobody better be touchin my stuff when i'm not around neither lolz

ugh oh. You asked for it now! Everyone is gonna check your profile and go over and start touching your "stuff" now!
_____________________
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
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-16-2008 20:20
CODE

fChangeSides( list inlist, string intPic ){
integer vIntLoop = llGetListLength -1;
do{
llSetTexture(inPic, llList2Integer( inList, vIntLoop ) );
}while (~(--vIntLoop));
}

fChangSides( [0, 5], pic_name );


EDIT: lol @ qie
well ya know sometimes people make stuff for other to use ;)
::looks at the Dresden Dolls fans' profile for stuff to touch:: ;)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-16-2008 20:51
CODE

default
{
state_entry()
{
llSay(0, "Hello, Crackpot!");
}

touch_start(integer total_number)
{
llSay(0, "Don't touch my junk.");
}
}
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-17-2008 00:31
From: Hewee Zetkin
CODE

default
{
state_entry()
{
llSay(0, "Hello, Crackpot!");
}

touch_start(integer total_number)
{
llSay(0, "Don't touch my junk.");
}
}

::teases:: so if I'm not there when it first runs, who's it calling a crackpot =P

/kidding
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-17-2008 00:37
From: Void Singer
::teases:: so if I'm not there when it first runs, who's it calling a crackpot =P

/kidding

Don't kid. It's serious. This pot cracked a long time ago. :)
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
01-17-2008 08:25
From: Hewee Zetkin
I'm pretty sure Meade was talking about doing something like: ...

Yep. TY for making me clearer. :)
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left