Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animations

Asher LeFay
Registered User
Join date: 22 Jan 2003
Posts: 77
04-12-2003 18:53
Can you u/l an animation, or do u have to u/l frames and have a timer/texture changer script that blasts through the frames?
_____________________
"If you look around the table, and you can't see who the sucker is..." and Im afraid i never see
Ama Omega
Lost Wanderer
Join date: 11 Dec 2002
Posts: 1,770
04-12-2003 21:16
Somewhere in between

You have frames, all one one texture, and use the llAnimateTexture call.
Deeblue Zeeman
T-800
Join date: 12 Mar 2003
Posts: 186
04-12-2003 21:57
Asher,

Take the frames of your animation and lay them all out on one texture. Check out the example image I've posted to see what I mean.

Then put that texture onto an object, let's say a cube for now. And add the following script to the object.

CODE

default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | LOOP, ALL_SIDES, 8, 8, 0, 64, 10);
}
}


The values 8 and 8 specify how many frames are on the grid/texture. So in this case we have 8 x 8 = 64 frames.

Value 0 is the start frame. (Frames start at number 0, not 1).

Value 64 is animation length. (You could actually specify 0 for the end frame, it would play through to the very end of the animation depending on how big it was. I just put in the end frame myself as a force of habit).

Value 10 is the speed of the animation in frames-per-second.

As with other texture functions, ALL_SIDES could be a numerical value referring to any face of your object. In the case of a cube it would obviously be any face from 1 to 6. Etc.


There are a few other parameters that can be set to change the way the animation loops, and how it moves, etc. Check the lsl_reference.htm file in your Second Life install directory for more details on the llSetTextureAnim function. :)
_____________________
Come visit me sometime:

Deeblue's Place
Hawthorne 50,70 in the Outlands.
Asher LeFay
Registered User
Join date: 22 Jan 2003
Posts: 77
I am in your debt!
04-13-2003 09:21
Great, thnxs so much Ama, Deeblue!
_____________________
"If you look around the table, and you can't see who the sucker is..." and Im afraid i never see