Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texture Change on Voice Command

Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
07-22-2005 23:21
Again, I'm sure this is around, I saw part of this posted somewhere. I need to have at least 5 texture change options. So if I say /5 pink the texture will change to my pink2 texture located inside the prim.

Also, if it's possible to change textures and colors from within the same script, maybe on different channels, I'd love that option as well. Example: Shoe color plaid, trim green.

Thank you!! :D
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-22-2005 23:44
Here's a quick-and-dirty little writeup:
CODE

integer CHAT_CHANNEL = 5; // The chat channel that the owner uses to command the script.
integer FACE = ALL_SIDES; // The face on which the texture should appear.
default {
state_entry() {
llListen(CHAT_CHANNEL, "", llGetOwner(), "");
}
listen(integer channel, string name, key id, string message) {
if (llGetInventoryKey(message) != NULL_KEY) {
llSetTexture(message, FACE);
}
}
}

Just put the texture in the inventory of the object. To make the texture appear, say its name on the chat channel you set in CHAT_CHANNEL. For example, if there's a texture named "pink" (w/o quotes) in the inventory, say "/5 pink" (w/o quotes) to set the texture on the object.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
07-23-2005 00:38
Hey Chris this is great. Thank you.
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
07-23-2005 09:56
Also note that this also means that you can enter any UUID for a texture, because SL will accept either textures or inventory names in an llSetTexture call.

( I HATE C style braces )
Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
problem
08-06-2005 22:40
the script works great for me, but when i put it in a no mod object and send it to someone, it doesnt work. Is there a way around this?
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
08-06-2005 22:47
That's a problem with llGetInventoryKey, it only works for modable objects.
Here's a version that uses a hybrid llGetInventoryKey/for-loop, when the object or the textures aren't full permission, the texture change will be slower, but it will still happen:
CODE

integer CHAT_CHANNEL = 5; // The chat channel that the owner uses to command the script.
integer FACE = ALL_SIDES; // The face on which the texture should appear.
default {
state_entry() {
llListen(CHAT_CHANNEL, "", llGetOwner(), "");
}
listen(integer channel, string name, key id, string message) {
if (llGetInventoryKey(message) != NULL_KEY) {
llSetTexture(message, FACE);
} else {
integer num = llGetInventoryNumber(INVENTORY_TEXTURE);
integer i;
for (i = 0; i < num; ++i) {
string texture = llGetInventoryName(INVENTORY_TEXTURE, i);
if (texture == message) {
llSetTexture(texture, FACE);
return;
}
}
}
}
}
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
Same thing happens here. Can it be fixed?
08-06-2005 23:16
// This code is public domain.
// masa was here 20050302

integer CHANNEL = 2; // channel to listen for commands on
integer OWNER_ONLY = TRUE; // only owner can control
integer USE_IMS = TRUE; // send IMs instead of using chat
string COMMAND_CHANGE_COLOR = "object"; // command to change color
string COMMAND_LIST_COLORS = "listcolors"; // command to list colors
integer MAX_CHAT_LENGTH = 255; // max size for one message
string PREFIX_HEX = "#"; // prefix to specify hex code
string PREFIX_VECTOR = "<"; // prefix to specify vector code
list LINKS_TO_SET = [LINK_SET, ALL_SIDES]; // [link number, link face, ...]

list COLORS;

// the list is too big to set at once :o
// note that you may get syntax errors and need to rearrange this list
// if you change the script much.
set_colors() {
COLORS = [
// http://halflife.ukrpack.net/csfiles/help/colors.shtml
"steelblue", "#4682B4", "royalblue", "#041690", "cornflowerblue", "#6495ED",
"lightsteelblue", "#B0C4DE", "mediumslateblue", "#7B68EE", "slateblue", "#6A5ACD",
"darkslateblue", "#483D8B", "midnightblue", "#191970", "navy", "#000080",
"darkblue", "#00008B", "mediumblue", "#0000CD", "blue", "#0000FF",
"dodgerblue", "#1E90FF", "deepskyblue", "#00BFFF", "lightskyblue", "#87CEFA",
"skyblue", "#87CEEB", "lightblue", "#ADD8E6", "powderblue", "#B0E0E6",
"azure", "#F0FFFF", "lightcyan", "#E0FFFF", "paleturquoise", "#AFEEEE",
"mediumturquoise", "#48D1CC", "lightseagreen", "#20B2AA", "darkcyan", "#008B8B",
"teal", "#008080", "cadetblue", "#5F9EA0", "darkturquoise", "#00CED1",
"aqua", "#00FFFF", "cyan", "#00FFFF", "turquoise", "#40E0D0",
"aquamarine", "#7FFFD4", "mediumaquamarine", "#66CDAA", "darkseagreen", "#8FBC8F"
] + [
"mediumseagreen", "#3CB371", "seagreen", "#2E8B57", "darkgreen", "#006400",
"green", "#008000", "forestgreen", "#228B22", "limegreen", "#32CD32",
"lime", "#00FF00", "chartreuse", "#7FFF00", "lawngreen", "#7CFC00",
"greenyellow", "#ADFF2F", "yellowgreen", "#9ACD32", "palegreen", "#98FB98",
"lightgreen", "#90EE90", "springgreen", "#00FF7F", "mediumspringgreen", "#00FA9A",
"darkolivegreen", "#556B2F", "olivedrab", "#6B8E23", "olive", "#808000",
"darkkhaki", "#BDB76B", "darkgoldenrod", "#B8860B", "goldenrod", "#DAA520",
"gold", "#FFD700", "yellow", "#FFFF00", "khaki", "#F0E68C", "palegoldenrod", "#EEE8AA",
"blanchedalmond", "#FFEBCD", "moccasin", "#FFE4B5", "wheat", "#F5DEB3",
"navajowhite", "#FFDEAD", "burlywood", "#DEB887", "tan", "#D2B48C"
] + [
"rosybrown", "#BC8F8F", "sienna", "#A0522D", "saddlebrown", "#8B4513",
"chocolate", "#D2691E", "peru", "#CD853F", "sandybrown", "#F4A460",
"darkred", "#8B0000", "maroon", "#800000", "brown", "#A52A2A",
"firebrick", "#B22222", "indianred", "#CD5C5C", "lightcoral", "#F08080",
"salmon", "#FA8072", "darksalmon", "#E9967A", "lightsalmon", "#FFA07A",
"coral", "#FF7F50", "tomato", "#FF6347", "darkorange", "#FF8C00",
"orange", "#FFA500", "orangered", "#FF4500", "crimson", "#DC143C",
"red", "#FF0000", "deeppink", "#FF1493", "fuchsia", "#FF00FF",
"magenta", "#FF00FF", "hotpink", "#FF69B4", "lightpink", "#FFB6C1",
"pink", "#FFC0CB", "palevioletred", "#DB7093", "mediumvioletred", "#C71585"
] + [
"purple", "#800080", "darkmagenta", "#8B008B", "mediumpurple", "#9370DB",
"blueviolet", "#8A2BE2", "indigo", "#4B0082", "darkviolet", "#9400D3",
"darkorchid", "#9932CC", "mediumorchid", "#BA55D3", "orchid", "#DA70D6",
"violet", "#EE82EE", "plum", "#DDA0DD", "thistle", "#D8BFD8",
"lavender", "#E6E6FA", "ghostwhite", "#F8F8FF", "aliceblue", "#F0F8FF",
"mintcream", "#F5FFFA", "honeydew", "#F0FFF0", "lightgoldenrodyellow", "#FAFAD2",
"lemonchiffon", "#FFFACD", "cornsilk", "#FFF8DC", "lightyellow", "#FFFFE0",
"ivory", "#FFFFF0", "floralwhite", "#FFFAF0", "linen", "#FAF0E6",
"oldlace", "#FDF5E6", "antiquewhite", "#FAEBD7", "bisque", "#FFE4C4 ",
"peachpuff", "#FFDAB9", "papayawhip", "#FFEFD5", "beige", "#F5F5DC"
] + [
"seashell", "#FFF5EE", "lavenderblush", "#FFF0F5", "mistyrose", "#FFE4E1",
"snow", "#FFFAFA", "white", "#FFFFFF", "whitesmoke", "#F5F5F5",
"gainsboro", "#DCDCDC", "lightgrey", "#D3D3D3", "silver", "#C0C0C0",
"darkgray", "#A9A9A9", "gray", "#808080", "lightslategray", "#778899",
"slategray", "#708090", "dimgray", "#696969", "darkslategray", "#2F4F4F",
"black", "#000000"
] + [
// :o
"carnationpink", "#FA7FC1"
];
}

say(key id, string str) {
if ( USE_IMS ) llInstantMessage( id, str );
else llWhisper(0, str);
}

vector color_from_hex(string str) {
return <;(integer)("0x" + llGetSubString(str,1,2)),
(integer)("0x" + llGetSubString(str,3,4)),
(integer)("0x" + llGetSubString(str,5,6))> / 255;
}

vector color_from_vector(string vec) {
// caveat: 1,1,1 will be treated as #ffffff, not #010101
list l = llParseString2List(vec, [" ", ",", "<", ">"], []);
vector v;

v.x = (float)llList2String(l, 0);
v.y = (float)llList2String(l, 1);
v.z = (float)llList2String(l, 2);

if ( v.x > 1 || v.y > 1 || v.z > 1 ) v /= 255;

return v;
}

vector color_from_name(string name) {
// vv strip spaces and force lowercase vv
integer x = llListFindList(COLORS, [ llToLower(llDumpList2String(llParseString2List(name, [" "], []), "";)) ]);
if ( x == -1 ) return <-1,-1,-1>;
return color_from_hex( llList2String(COLORS, x+1) );
}

set_color(key id, string str) {
vector color;
integer i;
if ( llGetSubString(str, 0, 0) == PREFIX_HEX ) // hex code
color = color_from_hex( str );
else if ( llGetSubString(str, 0, 0) == PREFIX_VECTOR ) // vector
color = color_from_vector( str );
else
color = color_from_name( str );

if ( color.x < 0 || color.x > 1 || color.y < 0 || color.y > 1 || color.z < 0 || color.z > 1 ) {
say( id, "Invalid color specified: " + str );
return;
}

llSetColor(color,ALL_SIDES);
}

list_colors(key id) {
string str = "";
string nstr = "";
integer i;

for ( i = 0; i < llGetListLength( COLORS ); i += 2 ) {
nstr = str + llList2String(COLORS, i) + ", ";

if ( llStringLength(nstr) > MAX_CHAT_LENGTH ) {
say(id, str);
str = llList2String(COLORS, i);
} else {
str = nstr;
}
}
if ( str != "" ) say(id, str);
}

default {
state_entry() {
set_colors();
llListen( CHANNEL, "", llGetOwner(), "" );
}

listen(integer channel, string name, key id, string msg) {
string command;
string argument;
list l;

if (OWNER_ONLY && id != llGetOwner()) return;

l = llParseStringKeepNulls( msg, [" "], [] );
command = llList2String(l, 0);
argument = llDumpList2String( llList2List(l, 1, -1), " " );

if ( command == COMMAND_CHANGE_COLOR )
set_color(id, argument);
else if ( command == COMMAND_LIST_COLORS )
list_colors(id);

}
}
Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
08-06-2005 23:17
wow that looks a mess. sorry bout that. pasted back from script in game
Catherine Omega
Geometry Ninja
Join date: 10 Jan 2003
Posts: 2,053
08-06-2005 23:25
From: Imani Moseley
wow that looks a mess. sorry bout that. pasted back from script in game
Post between
CODE
 or 
CODE
 tags. Remember to close them: [tag]Script goes here.[/tag]
_____________________
Need scripting help? Visit the LSL Wiki!
Omega Point - Catherine Omega's Blog
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
08-07-2005 00:54
Here it is in tags.

CODE

// This code is public domain.
// masa was here 20050302

integer CHANNEL = 2; // channel to listen for commands on
integer OWNER_ONLY = TRUE; // only owner can control
integer USE_IMS = TRUE; // send IMs instead of using chat
string COMMAND_CHANGE_COLOR = "object"; // command to change color
string COMMAND_LIST_COLORS = "listcolors"; // command to list colors
integer MAX_CHAT_LENGTH = 255; // max size for one message
string PREFIX_HEX = "#"; // prefix to specify hex code
string PREFIX_VECTOR = "<"; // prefix to specify vector code
list LINKS_TO_SET = [LINK_SET, ALL_SIDES]; // [link number, link face, ...]

list COLORS;

// the list is too big to set at once :o
// note that you may get syntax errors and need to rearrange this list
// if you change the script much.
set_colors() {
COLORS = [
// http://halflife.ukrpack.net/csfiles/help/colors.shtml
"steelblue", "#4682B4", "royalblue", "#041690", "cornflowerblue", "#6495ED",
"lightsteelblue", "#B0C4DE", "mediumslateblue", "#7B68EE", "slateblue", "#6A5ACD",
"darkslateblue", "#483D8B", "midnightblue", "#191970", "navy", "#000080",
"darkblue", "#00008B", "mediumblue", "#0000CD", "blue", "#0000FF",
"dodgerblue", "#1E90FF", "deepskyblue", "#00BFFF", "lightskyblue", "#87CEFA",
"skyblue", "#87CEEB", "lightblue", "#ADD8E6", "powderblue", "#B0E0E6",
"azure", "#F0FFFF", "lightcyan", "#E0FFFF", "paleturquoise", "#AFEEEE",
"mediumturquoise", "#48D1CC", "lightseagreen", "#20B2AA", "darkcyan", "#008B8B",
"teal", "#008080", "cadetblue", "#5F9EA0", "darkturquoise", "#00CED1",
"aqua", "#00FFFF", "cyan", "#00FFFF", "turquoise", "#40E0D0",
"aquamarine", "#7FFFD4", "mediumaquamarine", "#66CDAA", "darkseagreen", "#8FBC8F"
] + [
"mediumseagreen", "#3CB371", "seagreen", "#2E8B57", "darkgreen", "#006400",
"green", "#008000", "forestgreen", "#228B22", "limegreen", "#32CD32",
"lime", "#00FF00", "chartreuse", "#7FFF00", "lawngreen", "#7CFC00",
"greenyellow", "#ADFF2F", "yellowgreen", "#9ACD32", "palegreen", "#98FB98",
"lightgreen", "#90EE90", "springgreen", "#00FF7F", "mediumspringgreen", "#00FA9A",
"darkolivegreen", "#556B2F", "olivedrab", "#6B8E23", "olive", "#808000",
"darkkhaki", "#BDB76B", "darkgoldenrod", "#B8860B", "goldenrod", "#DAA520",
"gold", "#FFD700", "yellow", "#FFFF00", "khaki", "#F0E68C", "palegoldenrod", "#EEE8AA",
"blanchedalmond", "#FFEBCD", "moccasin", "#FFE4B5", "wheat", "#F5DEB3",
"navajowhite", "#FFDEAD", "burlywood", "#DEB887", "tan", "#D2B48C"
] + [
"rosybrown", "#BC8F8F", "sienna", "#A0522D", "saddlebrown", "#8B4513",
"chocolate", "#D2691E", "peru", "#CD853F", "sandybrown", "#F4A460",
"darkred", "#8B0000", "maroon", "#800000", "brown", "#A52A2A",
"firebrick", "#B22222", "indianred", "#CD5C5C", "lightcoral", "#F08080",
"salmon", "#FA8072", "darksalmon", "#E9967A", "lightsalmon", "#FFA07A",
"coral", "#FF7F50", "tomato", "#FF6347", "darkorange", "#FF8C00",
"orange", "#FFA500", "orangered", "#FF4500", "crimson", "#DC143C",
"red", "#FF0000", "deeppink", "#FF1493", "fuchsia", "#FF00FF",
"magenta", "#FF00FF", "hotpink", "#FF69B4", "lightpink", "#FFB6C1",
"pink", "#FFC0CB", "palevioletred", "#DB7093", "mediumvioletred", "#C71585"
] + [
"purple", "#800080", "darkmagenta", "#8B008B", "mediumpurple", "#9370DB",
"blueviolet", "#8A2BE2", "indigo", "#4B0082", "darkviolet", "#9400D3",
"darkorchid", "#9932CC", "mediumorchid", "#BA55D3", "orchid", "#DA70D6",
"violet", "#EE82EE", "plum", "#DDA0DD", "thistle", "#D8BFD8",
"lavender", "#E6E6FA", "ghostwhite", "#F8F8FF", "aliceblue", "#F0F8FF",
"mintcream", "#F5FFFA", "honeydew", "#F0FFF0", "lightgoldenrodyellow", "#FAFAD2",
"lemonchiffon", "#FFFACD", "cornsilk", "#FFF8DC", "lightyellow", "#FFFFE0",
"ivory", "#FFFFF0", "floralwhite", "#FFFAF0", "linen", "#FAF0E6",
"oldlace", "#FDF5E6", "antiquewhite", "#FAEBD7", "bisque", "#FFE4C4 ",
"peachpuff", "#FFDAB9", "papayawhip", "#FFEFD5", "beige", "#F5F5DC"
] + [
"seashell", "#FFF5EE", "lavenderblush", "#FFF0F5", "mistyrose", "#FFE4E1",
"snow", "#FFFAFA", "white", "#FFFFFF", "whitesmoke", "#F5F5F5",
"gainsboro", "#DCDCDC", "lightgrey", "#D3D3D3", "silver", "#C0C0C0",
"darkgray", "#A9A9A9", "gray", "#808080", "lightslategray", "#778899",
"slategray", "#708090", "dimgray", "#696969", "darkslategray", "#2F4F4F",
"black", "#000000"
] + [
// :o
"carnationpink", "#FA7FC1"
];
}

say(key id, string str) {
if ( USE_IMS ) llInstantMessage( id, str );
else llWhisper(0, str);
}

vector color_from_hex(string str) {
return <(integer)("0x" + llGetSubString(str,1,2)),
(integer)("0x" + llGetSubString(str,3,4)),
(integer)("0x" + llGetSubString(str,5,6))> / 255;
}

vector color_from_vector(string vec) {
// caveat: 1,1,1 will be treated as #ffffff, not #010101
list l = llParseString2List(vec, [" ", ",", "<", ">"], []);
vector v;

v.x = (float)llList2String(l, 0);
v.y = (float)llList2String(l, 1);
v.z = (float)llList2String(l, 2);

if ( v.x > 1 || v.y > 1 || v.z > 1 ) v /= 255;

return v;
}

vector color_from_name(string name) {
// vv strip spaces and force lowercase vv
integer x = llListFindList(COLORS, [ llToLower(llDumpList2String(llParseString2List(name, [" "], []), "")) ]);
if ( x == -1 ) return <-1,-1,-1>;
return color_from_hex( llList2String(COLORS, x+1) );
}

set_color(key id, string str) {
vector color;
integer i;
if ( llGetSubString(str, 0, 0) == PREFIX_HEX ) // hex code
color = color_from_hex( str );
else if ( llGetSubString(str, 0, 0) == PREFIX_VECTOR ) // vector
color = color_from_vector( str );
else
color = color_from_name( str );

if ( color.x < 0 || color.x > 1 || color.y < 0 || color.y > 1 || color.z < 0 || color.z > 1 ) {
say( id, "Invalid color specified: " + str );
return;
}

llSetColor(color,ALL_SIDES);
}

list_colors(key id) {
string str = "";
string nstr = "";
integer i;

for ( i = 0; i < llGetListLength( COLORS ); i += 2 ) {
nstr = str + llList2String(COLORS, i) + ", ";

if ( llStringLength(nstr) > MAX_CHAT_LENGTH ) {
say(id, str);
str = llList2String(COLORS, i);
} else {
str = nstr;
}
}
if ( str != "" ) say(id, str);
}

default {
state_entry() {
set_colors();
llListen( CHANNEL, "", llGetOwner(), "" );
}

listen(integer channel, string name, key id, string msg) {
string command;
string argument;
list l;

if (OWNER_ONLY && id != llGetOwner()) return;

l = llParseStringKeepNulls( msg, [" "], [] );
command = llList2String(l, 0);
argument = llDumpList2String( llList2List(l, 1, -1), " " );

if ( command == COMMAND_CHANGE_COLOR )
set_color(id, argument);
else if ( command == COMMAND_LIST_COLORS )
list_colors(id);

}
}
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Imani Moseley
Registered User
Join date: 23 Mar 2005
Posts: 34
08-07-2005 12:03
texture change still not working for others. :/
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
08-07-2005 16:52
The line llListen(CHANNEL, "", llGetOwner(), "";);

should have "" rather than llGetOwner() to make it listen to everyone.
Lucas Sion
Registered User
Join date: 25 Aug 2005
Posts: 16
Texture
08-29-2005 14:39
I've got the sme problem, only I need to swap between only two different textures. Tex1 and Tex2, on a voice command. I can only find scripts with a billion different colors. Can anyone help?
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
11-03-2005 13:32
Ok I currently use this script in some objects I share with friends but run into some problems

Mostly my problem is when I give them the wings the script is in they have to reset it to be able to use it.

There a way it can automaticly reset itself upon wearing/rezzing?
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Robin Peel
Registered User
Join date: 8 Feb 2005
Posts: 163
11-03-2005 18:15
I had that problem with a script, it would never work for anybody I gave it to unless they reset the script, then somebody in this forum gave me a code to put into the script. I've never had that problem again when I give them something. Here is the code.
CODE
changed(integer change)
{
if (change & 128)
{
llResetScript();
}
}
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
11-06-2005 08:46
From: Lucas Sion
I've got the sme problem, only I need to swap between only two different textures. Tex1 and Tex2, on a voice command. I can only find scripts with a billion different colors. Can anyone help?


I pieced the following together from this discussion: Texture on Demand:
/54/70/54293/1.html

It allows you to use text commands on channel 5 to change textures, alpha, animation, scale and color. I apoligize if the formatting in this script are not proper, this is the first time I tried quoting a script in this forum. I cut and pasted it out of an external editor.

CODE

default
{
state_entry()
{
llListen(5,"",llGetOwner(),"");
}
listen(integer chan, string name, key id, string msg)
{
if(msg=="window")
{
llSetTexture("window",ALL_SIDES);
llSetAlpha(0.1,ALL_SIDES);//0.1 shows little of the texture
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<1,1,1>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255
}
if(msg=="tint")
{
llSetTexture("window",ALL_SIDES);
llSetAlpha(0.5,ALL_SIDES);//0.5 shows 50 percent of the texture
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<1,1,1>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255
}
if(msg=="tint2")
{
llSetTexture("window",ALL_SIDES);
llSetAlpha(0.9,ALL_SIDES);//0.9 shows 90 percent of the texture
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<1,1,1>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255
}
if(msg=="tint3")
{
llSetTexture("window",ALL_SIDES);
llSetAlpha(0.9,ALL_SIDES);//0.9 shows 90 percent of the texture
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<0,0,0.5>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255 0.5 adds medium blue tint
}
if(msg=="sky")
{
llSetTexture("sky",ALL_SIDES);
llSetAlpha(1.0,ALL_SIDES);
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0.1); //this may not work as expected, 0.1 is a slow scroll
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<1,1,1>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255, 1,1,1=white, 0,0,0=black
}
if(msg=="shield")
{
llSetTexture("shield",ALL_SIDES);
llSetAlpha(1.0,ALL_SIDES);
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES, 1, 1, 0, 0, 0); //this may not work as expected
llScaleTexture(1,1, ALL_SIDES);
llSetColor(<1,1,1>,ALL_SIDES); //set color works on a 0 to 1 RGB basis, not 0 to 255
}

{
//see above but change texture name, coords, etc
}
//etcetera for other settings

}
}


_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
11-06-2005 09:16
Hmm I edited the post below and cut/paste the script directly out of the SL script but it lost its formatting. Am i doing that wrong?
_____________________

VRchitecture Model Homes at http://slurl.com/secondlife/Shona/60/220/30
http://www.slexchange.com/modules.php?name=Marketplace&MerchantID=2240
http://shop.onrez.com/Archtx_Edo
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
11-06-2005 09:29
From: ArchTx Edo
Hmm I edited the post below and cut/paste the script directly out of the SL script but it lost its formatting. Am i doing that wrong?



try
CODE
 brackets
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.