Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

texture anim - scroll once and stop

Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
07-23-2008 00:53
I'm trying to do the following animation...

I have a texture that is half white (on the left) and half black (on the right). I have a sphere with the following texture params:

Horiz repeats: .5
Vert repeats: 1
Rotation: 0
Horiz offset: -.25
Vert offset: 0

This gives me a white sphere.

Now I want the texture anim to scroll the black onto the sphere and then scroll it back off in the same direction. *NOT* ping-pong. I do not want the scrolling to change direction and double back to start. I want the black to scroll on and keep going so the sphere goes back to being white. And then I want the anim to stop.

Could someone please tell me the incantation to make this happen? What params do I need to pass llSetTextureAnim?

Thank you!
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
07-23-2008 00:58
Why is it that as soon as I ask a question the next thing I try works? I should ask the question first :-)

This does the trick:

llSetTextureAnim(ANIM_ON | SMOOTH, ALL_SIDES, 2, 1, 0, 3, .5);

The next question is, why can this only be done once? If I do the same anim again nothing happens. I have to do this...

llSetTextureAnim( FALSE, ALL_SIDES, 1, 1, 1, 1, 0.); // this turns off anim

before I can do another animation.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
07-23-2008 01:00
I think if you want it to stop rather than keep going, your best bet might be to create another texture (white, black, white). Otherwise you're probably looking for a an animation with the SMOOTH flag, but without ROTATE and SCALE.
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
07-23-2008 01:47
texture animation is a prim property.

Thus, if you assign the *same* values for the animation then you will not see a change at all as for the prim itself, nothing changes.

Therefore you will either have to slightly vary the settings or "stop" the animation before starting the next one.
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
07-23-2008 05:03
Thanks, Squirrel