Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

moving water script question

FD Spark
Prim & Texture Doodler
Join date: 30 Oct 2006
Posts: 4,697
12-08-2006 15:10
I am new at this whole scripting thing and I have been trying to find specific code to change the direction of water flow in the moving water script but I don't know what to do or where to look in the wiki.
Can someone direct me or tell me how and where to change the direction in the moving water script would be greatly appreciated.
It currently moving right to left and I want it to move down to match the texture.
Thanks
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-08-2006 15:23
I ended up uploading a new texture that was rotated in Photoshop. I couldn't figure out a way to turn the scripted rotation, it just moved forward or back. Rotating the texture on the prim through the edit controls rotated the movement as well.

So... either we're both missing something, or it can't be done :)
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
12-08-2006 15:33
Which moving water script?
FD Spark
Prim & Texture Doodler
Join date: 30 Oct 2006
Posts: 4,697
12-08-2006 17:15
I don't about the other scripts I just got free one
Some told me to change part of the ending status code to -0.1 but I got nothing but errors.
I end up rotating the image but I wanted the lines of the texture to rotate down they are going down but its more like this with the movement
_ _ _
_ _ _
going down
but I wanted it to move this way down
ll
ll
ll
ll
I found something in wiki on rotation scripts but I have no clue at what I am reading is going to do what I want or how:(
I would copy and paste the script but I have head ache now and not feel like trying to find the right code to even do that at the moment LOL
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
12-08-2006 17:32
One way is to use a timer to alter the texture parameters dynamically:

llSetTexture, llScaleTexture, llOffsetTexture, llRotateTexture

you can alter them all at once with llSetPrimitiveParams:
http://lslwiki.com/lslwiki/wakka.php?wakka=llSetPrimitiveParams

e.g
CODE

llSetPrimitiveParams [PRIM_TEXTURE, 0, "66864f3c-e095-d9c8-058d-d6575e6ed1b8", <2,8,0>, <.5,.5,0>, PI / 4]

and use variables that you alter in the timer script.


Alternatively, you could make a texture with a heap of snapshots of what you want to see and show them automatically with llAnimate
http://lslwiki.com/lslwiki/wakka.php?wakka=llSetTextureAnim
Most fire flames are done this way.
Sam Brewster
Registered User
Join date: 20 Feb 2006
Posts: 82
12-08-2006 20:09
From: FD Spark
I am new at this whole scripting thing and I have been trying to find specific code to change the direction of water flow in the moving water script but I don't know what to do or where to look in the wiki.
Can someone direct me or tell me how and where to change the direction in the moving water script would be greatly appreciated.
It currently moving right to left and I want it to move down to match the texture.
Thanks


I'm assuming your using an Anim_Smooth free script or something like it to move your water texture.

Edit the prim that contains the water texture, go to the texture tab on the expanded build menu (click on "more" in the build menu dialog box), under texture rotation, set to 90, 180 or 270 degress to change direction of the water flow.
_____________________
FD Spark
Prim & Texture Doodler
Join date: 30 Oct 2006
Posts: 4,697
12-08-2006 21:35
Animation Smooth let me rotate the image but the other didn't.
I will read the other suggestions.
I have particle script too but I don't have clue how to use it yet.
I finally figured out how to do some very basic things like put animation inside a object. Still reading and learning.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
12-09-2006 09:43
From: someone
Edit the prim that contains the water texture, go to the texture tab on the expanded build menu (click on "more" in the build menu dialog box), under texture rotation, set to 90, 180 or 270 degress to change direction of the water flow.


As far as I remember, that changes the texture rotation and the movement direction. It can't change only one of the two.

Imagine an arrow that's pointing north, and the texture is moving S -> N. So the arrow is moving end-to-end. If you rotate it, the arrow might point east, and the texture will move W -> E. So the arrow is still moving end-to-end, pointing in a different diurection.

If you want the arrow to continue pointing N, but you want the texture to animate W -> E (so you want the arrow to move sideways)... I don't think this can be done without uploading a new texture.