|
Esch Snoats
Artist, Head Minion
Join date: 2 May 2006
Posts: 261
|
01-20-2007 01:52
I have a texture I made that is 4 frames across on the X axis on a 1024x1024 image. The rest of the texture is blank except for this top row of 4 frames. I put the texture on the prim and stretched it via the "texture" tab using repeats per face and all of that till only 1 frame shows on the prim.
I put the script in that uses LlSetTextureAnim and although the script does exactly what it's suppose to do, it's overriding the texture settings on the prim and squishing the texture horizontally and resetting the vertical to 1.0 for some reason, showing the entire texture instead of 25% of it like I had set. If I halt the animation by making it FALSE, then the original settings kick back in and everything looks the way it should.
So the script works just fine with LlSetTextureAnim and animates the texture, but I was wondering if there's a command that will force it to not squish the texture and use the original settings I set on the prim?
This is what I'm using:
default { state_entry() { llSetTextureAnim (ANIM_ON | LOOP, 1, 4, 1, 0, 0, 0.5); }
}
Any help is greatly appreciated, thanks! E
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
01-20-2007 02:47
llSetTextureAnim will set the scales to the frame values you give it. i.e. your parameter defines the grid to be used. youa re using 4, 1 which is what its giving you.
llSetTextureAnim(integer mode, integer side, integer x_frames, integer y_frames, float start, float length, float rate);
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
01-20-2007 03:34
if you have a texture laid out something like: 0 1 2 3 * * * * * * * * * * * * where *'s are blank parts of the texture, and the numbers are the frame you wish to show, I'd use: default { state_entry() { llSetTextureAnim (ANIM_ON | LOOP, // options 1, // prim face to animate 4, 4, // my texture is 4 frames wide, and 4 frames tall 0, 3, // loop through frames 0 to 3, (just the top row) 0.5); // speed } } It looks like you had said you texture was 4 frames wide... but only one frame tall (which would cause it to use 25% of the width and 100% of the height in each frame). Hope that helps some! 
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
01-20-2007 08:16
Hi Jopsy, this interested me so I did a little experimenting  and instead of: 0, 3, // loop through frames 0 to 3, (just the top row)I came to the conclusion that it should be: 0, 4, // loop through frames starting on frame 0 for 4 frames (just the top row)
|
|
Esch Snoats
Artist, Head Minion
Join date: 2 May 2006
Posts: 261
|
01-20-2007 11:23
Ah ha! That must be the problem. I thought I had to define how many rows it was allowed to go through (just 1) not realizing that it's more accurate to saythe entire texture has 4 rows and to use the loop through controls to get it to do just the first 4 frames. I'll check this out now. Thank you very much!!
E
|
|
Jopsy Pendragon
Perpetual Outsider
Join date: 15 Jan 2004
Posts: 1,906
|
01-20-2007 14:47
From: Pale Spectre I came to the conclusion that it should be: 0, 4, // loop through frames starting on frame 0 for 4 frames (just the top row)
You're absolutely right... thanks for catching that! =)
_____________________
* The Particle Laboratory * - One of SecondLife's Oldest Learning Resources. Free particle, control and targetting scripts. Numerous in-depth visual demonstrations, and multiple sandbox areas. - Stop by and try out Jopsy's new "Porgan 1800" an advanced steampunk styled 'particle organ' and the new particle texture store!
|