My terrain is actually kinda small O_O 512*512
No wonder the wakes werent appearing around the island, 12800*12800 theres a slim chance
[EDIT]
Hmm the Values
Shx#
Shy#
Shore_SX#
Shore_SY#
Are all 0...which could be a problem seeing as the first 2 position the wake...
Heres my code controlling the water (Terrain is 512*512)
calculate_shore:
foam=0
ran=0
while ran=0
y#=rnd(1000)*1.0
x#=rnd(1000)*1.0
gg=get terrain ground height(1,x#,y#)
if gg<6 and gg>-1
if ran=0
inc foam,1
if foam>=shores then foam=rnd(shores) : ran=1
else
foam=rnd(shores)
endif
shore_x#(foam)=x#
shore_y#(foam)=y#
shore_sx#(foam)=x#+(sin(ang)*1000.0)
shore_sy#(foam)=y#+(cos(ang)*1000.0)
sph=100
for ang=0 to 360
spx#=x#+(sin(ang)*1000.0)
spy#=y#+(cos(ang)*1000.0)
sg=get terrain ground height(1,spx#,spy#)
sdx#=x#+(sin(ang-90)*50.0)
sdy#=y#+(cos(ang-90)*50.0)
dg=get terrain ground height(1,sdx#,sdy#)
if dg=gg and sg<-10
shore_mul#(foam)=rnd(10000)/100.00
shore_sx#(foam)=spx#
shore_sy#(foam)=spy#
rotate object foam+100,0,ang,0
endif
next ang
endif
endwhile
for nl=0 to 1000
gosub updatewater
next nl
return
setup_water:
`Load water effect images
Load Image "textures/water01.bmp", 3,1
load image "water\water_001.bmp",50
load image "water\water_002.bmp",51
load image "water\water_003.bmp",52
load image "water\water_004.bmp",53
load image "water\water_005.bmp",54
load image "water\water_006.bmp",55
load image "water\water_007.bmp",56
load image "water\water_008.bmp",57
load image "water\water_009.bmp",58
load image "water\water_010.bmp",59
load image "water\water_011.bmp",60
load image "water\water_012.bmp",61
load image "water\water_013.bmp",62
load image "water\water_014.bmp",63
load image "water\water_015.bmp",64
load image "water\water_016.bmp",65
load image "water\water_017.bmp",66
load image "water\water_018.bmp",67
load image "water\water_019.bmp",68
load image "water\water_020.bmp",69
load image "water\water_foam.bmp",70
Load Image "textures\water01.bmp",71
`Make the animated texture plains
Make Object Plain 209,50000,50000
rotate object 209,270,0,0
make object plain 220,3000,3000
rotate object 220,270,0,0
make object plain 221,3000,3000
rotate object 221,270,0,0
texture object 209,3
texture object 220,50
texture object 221,50
set object transparency 220,2
set object transparency 221,2
set object ambience 220,rgb(64,64,64)
set object ambience 221,rgb(64,64,64)
Scale Object Texture 209,60,60
scale object texture 220,58,58
scale object texture 221,58,58
Position Object 209,0,2,0
position object 220,0,4.4,0
position object 221,0,5,0
Set Object Light 209,0
set object light 220,0
set object light 221,0
Set Object Fog 209,0
set object fog 220,0
set object fog 221,0
Set Object Cull 209,0
set object cull 220,0
set object cull 221,0
ghost object on 220,2
ghost object on 221,2
`Make shore effect plains
for foam=300 to shores+300
make object plain foam,30,30
rotate object foam,270,0,0 : fix object pivot foam
texture object foam,70
position object foam,0,4.8,0
set object ambient foam,0
ghost object on foam,2
set object specular foam,0
set object specular power foam,0
set object transparency foam,2
next foam
return
updatewater:
tim=timer()-ot : ot=timer()
elapsed#=tim/150.0
inc water#,(elapsed#/20)+.5
if water#>19.0 then dec water#,19.0
texture object 220,water#+50
texture object 221,water#+50
if brightwater=1 then set detail mapping on 220,70-water#
if brightwater=2 then set light mapping on 220,70-water#
scroll object texture 220,(-0.00012*elapsed#),0
roll object left 220,(0.00323*elapsed#)
scroll object texture 221,(0.00012*elapsed#),(0.00006*elapsed#)
roll object left 221,(0.00481*elapsed#)
for foam=300 to shores+300
`5 = .04
shore_mul#(foam-300)=shore_mul#(foam-300)+(5*elapsed#)
if shore_mul#(foam-300)>100.0 then shore_mul#(foam-300)=shore_mul#(foam-300)-100.0
shx#=shore_sx#(foam-300)+((shore_x#(foam-300)-shore_sx#(foam-300))*shore_mul#(foam-300))
shy#=shore_sy#(foam-300)+((shore_y#(foam-300)-shore_sy#(foam-300))*shore_mul#(foam-300))
position object foam,shx#,4.8,shy#
fd=abs(sin(shore_mul#(foam-300)*180.0)*50)
fade object foam,fd
next foam
return
Any idea? Thanks for helping
[/EDIT]
Thanks
RPGamer
We need help! Email us! join@eternaldestinyonline.com