Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need help with a simple change texture script

Alysa DeFarge
Registered User
Join date: 31 Jan 2005
Posts: 77
05-25-2005 18:41
Hey guys... I don't know if I'm tired of looking at this, or what, but I need help with a simple change texture script.. without the random part.

I have an image... I also have it mirrored... both are in the prim... I want it to switch back and forth between the two, without a delay that the randon causes.. The script I have uses a random, and everytime I edit it even slightly, I break it... lol

Anyone have a simple one I can use? If at all possible, I also need a second prim to move in sinc with the first, doing the exact same thing. The speed I plan to use should make it pretty easy to sync, even withotu a special second script..

How it looks now, it doesn't flow.. it pauses on one of the 2 textures.. I also don't want it to have to re-rez with each change... Is that possible?


Thanks in advance for any help, it's HUGELY appreciated!
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
05-25-2005 18:52
Wait a moment, do you want them to just flicker repeatedly?
Alysa DeFarge
Registered User
Join date: 31 Jan 2005
Posts: 77
05-25-2005 19:13
pretty much... not as fast as a flame would tho... just switch fromone to the other and back again, on an endless loop... so it works like an animated gif.
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
05-25-2005 19:20
You may be interested in this tutorial by FlipperPA Peregrine:

http://www.slboutique.com/index.php?sid=&p=content&contentid=3

Titled "Creating Animated Textures for Use on Prim Faces", it's an easy way to do it! :)
_____________________
Keknehv Psaltery
Hacker
Join date: 11 Apr 2005
Posts: 1,185
05-25-2005 19:25
This script may work...

CODE

key texture1 = ""; //Put the first image's UUID here
key texture2 = ""; //Put the second image's UUID here

float waittime = 0.2; //How long to wait before changing images

default
{
state_entry()
{
while ( TRUE ) //This is an infinite loop...
{
llSetTexture( texture1 , ALL_SIDES ); //Put up the first texture. Replace the ALL_SIDES with whatever side number you desire.
llSleep( waittime ); //Wait before putting the next one up
llSetTexture( texture2 , ALL_SIDES ); //Put up the second texture. Replace the ALL_SIDES with whatever side number you desire.
llSleep( waittime ); //Wait before putting the next one up
}
}
}
Alysa DeFarge
Registered User
Join date: 31 Jan 2005
Posts: 77
05-25-2005 19:50
Torley, that's exactly what I wanted! Perfect! thank you :D

Keknehv, I didn't try yours yet, but I'll give it a go too... the one from the tutorial did exactly what i needed tho :D thanks for all the help!
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
05-25-2005 19:52
From: Torley Torgeson
You may be interested in this tutorial by FlipperPA Peregrine:

http://www.slboutique.com/index.php?sid=&p=content&contentid=3

Titled "Creating Animated Textures for Use on Prim Faces", it's an easy way to do it! :)

Use this one! Use this one! Don't make an infinite loop! This one has the least impact on the server and client!
_____________________
Jessica Qin
Wo & Shade, Importers
Join date: 16 Feb 2005
Posts: 161
05-26-2005 10:50
From: Torley Torgeson
You may be interested in this tutorial by FlipperPA Peregrine:

http://www.slboutique.com/index.php?sid=&p=content&contentid=3

Titled "Creating Animated Textures for Use on Prim Faces", it's an easy way to do it! :)


w00t! That's simply beautiful -- especially the script that converts animated GIFs into llSetTextureAnim()-ready Targa images! I'm so glad FlipperPS wrote it and that you posted about it.

Jess