Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Water Script Help

Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
01-14-2008 09:48
Hello everyone, I was directed over here from the texturing forum, I’m building a waterfall with a secret cave and I’m using the script below for the water animation. Everything works great … but when I go to the back of my water texture the water is running upwards. Is there any thing within this script that I can change so the my water animation flows downward on both sides of my water object? TIA

default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,0,0,0.0, 1,0.05);
}
}
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-14-2008 09:57
You'll have to do this outside of the script. I think it MAY work to rotate the texture on the back face 180 degrees, but if not you'll want to find a different prim or try using different faces of the one your are using (remember to include faces exposed by cuts and hollows).
Dumisani Ah
Pass me the hammer
Join date: 2 Dec 2006
Posts: 95
Im not much of a scripter at all, but
01-14-2008 10:28
I have had a similar issue many times before - I actually get by this probem by putting a alpha tex on the reverse side, a transparent tex, and then I place a back-to-back water prim with the flow going down one side, with again a transparent prim on the inner side. It works, but of course it doubles the prim use :( Anyway, I am not sure any interration or modification of the texture animations in SL will make two opposite sides of a prim flow the same way. I am an idiot with LSL, so please dont take this as correct ;)

Hope you manage!
Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
01-14-2008 10:31
From: Dumisani Ah
I have had a similar issue many times before - I actually get by this probem by putting a alpha tex on the reverse side, a transparent tex, and then I place a back-to-back water prim with the flow going down one side, with again a transparent prim on the inner side. It works, but of course it doubles the prim use :( Anyway, I am not sure any interration or modification of the texture animations in SL will make two opposite sides of a prim flow the same way. I am an idiot with LSL, so please dont take this as correct ;)

Hope you manage!


hey Dumisani .... thanks for that advice ,,,, I too am very weak with LSL,
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
01-14-2008 10:36
I believe the issue is that you are using ALL_SIDES, but the opposite sides have opposite senses of up and down. You can tell which side of the object is the back by using CTRL ALT SHIFT T after you select the texture. A box will pop up giving you the side.

Now just do a second texture animation command for just that side with the REVERSE flag on. You might want to do the edges too the same way, depends on what kind of prim you are using.
ArchTx Edo
Mystic/Artist/Architect
Join date: 13 Feb 2005
Posts: 1,993
01-14-2008 11:17
From: Dick Spad
Hello everyone, I was directed over here from the texturing forum, I’m building a waterfall with a secret cave and I’m using the script below for the water animation. Everything works great … but when I go to the back of my water texture the water is running upwards. Is there any thing within this script that I can change so the my water animation flows downward on both sides of my water object? TIA

default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,0,0,0.0, 1,0.05);
}
}


For a waterfall, using a cube, in the Edit object window set the Prim rotations to 0, 0, 90 and then in the texture window set the Texture Rotation to 90 and the water will flow down on all 4 vertical sides.

Bumping the speed up to 0.2 looks more realisitic to me for falling water. 0.05 looks too slow.

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,0,0,0.0, 1,0.2);
_____________________

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
Dick Spad
Life is a Pose Ball ....
Join date: 29 Oct 2007
Posts: 205
01-14-2008 11:24
From: ArchTx Edo
For a waterfall, using a cube, in the Edit object window set the Prim rotations to 0, 0, 90 and then in the texture window set the Texture Rotation to 90 and the water will flow down on all 4 vertical sides.

Bumping the speed up to 0.2 looks more realisitic to me for falling water. 0.05 looks too slow.

llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,0,0,0.0, 1,0.2);



Super!!! thank you so much ArchTx for this tip/answer .... as you can probably tell i'm very LSL illiterate .. lol
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-14-2008 13:13
From: Ralph Doctorow
I believe the issue is that you are using ALL_SIDES, but the opposite sides have opposite senses of up and down. You can tell which side of the object is the back by using CTRL ALT SHIFT T after you select the texture. A box will pop up giving you the side.

Now just do a second texture animation command for just that side with the REVERSE flag on. You might want to do the edges too the same way, depends on what kind of prim you are using.

You can only have one animation active for a prim. Any further calls (even if on different sides of the prim) will simply replace the old animation.
Ralph Doctorow
Registered User
Join date: 16 Oct 2005
Posts: 560
01-14-2008 14:15
From: Hewee Zetkin
You can only have one animation active for a prim. Any further calls (even if on different sides of the prim) will simply replace the old animation.
Ack -right I'd forgotten that .