Have you ever wanted to make water look like it's moving? This code allows you to see some of the easy ways to do it:
rem Load texture
load image "waves.jpg",1
for i=1 to 8
rem Make the water objects
make object box i,10,.2,10
rem Texture the water
texture object i,1
rem Position object
position object i,0,0,0
rem Rotate object
rotate object i,-45,0,0
rem Hide object
hide object i
next i
rem In the main loop:
do
print "[1] Top-left diagnol wave"
print "[2] Bottom-right diagnol wave"
print "[3] Top-right diagnol wave"
print "[4] Bottom-left diagnol wave"
print "[5] Straight line forward wave"
print "[6] Straight line backward wave"
print "[7] Straight line left wave"
print "[8] Straight line right wave"
rem For a top-left diagnol
scroll object texture 1,0.001,0.001
rem For a bottom-right diagnol
scroll object texture 2,-0.001,-0.001
rem For a top-right diagnol
scroll object texture 3,-0.001,0.001
rem For a bottom-left diagnol
scroll object texture 4,0.001,-0.001
rem For a straight line forward
scroll object texture 5,0,0.001
rem For a straight line backward
scroll object texture 6,0,-0.001
rem For a straight line left
scroll object texture 7,0.001,0
rem For a straight line right
scroll object texture 8,-0.001,0
if inkey$()="1"
show object 1
hide object 2
hide object 3
hide object 4
hide object 5
hide object 6
hide object 7
hide object 8
endif
if inkey$()="2"
show object 2
hide object 1
hide object 3
hide object 4
hide object 5
hide object 6
hide object 7
hide object 8
endif
if inkey$()="3"
show object 3
hide object 2
hide object 1
hide object 4
hide object 5
hide object 6
hide object 7
hide object 8
endif
if inkey$()="4"
show object 4
hide object 2
hide object 3
hide object 1
hide object 5
hide object 6
hide object 7
hide object 8
endif
if inkey$()="5"
show object 5
hide object 2
hide object 3
hide object 4
hide object 1
hide object 6
hide object 7
hide object 8
endif
if inkey$()="6"
show object 6
hide object 2
hide object 3
hide object 4
hide object 5
hide object 1
hide object 7
hide object 8
endif
if inkey$()="7"
show object 7
hide object 2
hide object 3
hide object 4
hide object 1
hide object 6
hide object 5
hide object 8
endif
if inkey$()="8"
show object 8
hide object 2
hide object 3
hide object 4
hide object 5
hide object 1
hide object 7
hide object 6
endif
loop
The water I used is attached.
www.war3forums.net
A.K.A Death Stalker