I don't think that would work because you also have to add 200 in the 'move particle' subroutine.
One way i found to add a lot more random depth is to change the random statement for the zpos into a big number like 500 instead of just 5 and then it well spread itself out. This works a lot better than just adding 200 cause that would just move all of the drops back to the same depth. here's the code incase you didn't understand what i said
+ Code Snippet`Rain particle generator v1.1
`By Kentaree 19/05/03
`http://members.lycos.co.uk/darknessrising/
`Setup program environment.
sync on
sync rate 60
autocam off
`Load media.
load image "C:Program FilesDark Basic SoftwareDark Basic Litemediarain.jpg",1
`Set up an array holding position and speed of particles
dim rain(50,4)
xPos=0
yPos=1
zPos=2
speed=3
`Make all the particles
gosub _setupParticles
`Main game loop
do
randomize timer()
gosub _moveParticles
sync
loop
_setupParticles:
`Make textured and ghosted plains numbered 1 to 50, and set transparency on
for i=1 to 50
make object plain i, 1,1
set object i,1,0,0
texture object i,1
ghost object on i
disable object zdepth i
lock object on i
`Setup array values for each particles holding the positional data
rain(i-1,xPos)=(int(rnd(40)+1))-20: `X coordinate of particle
rain(i-1,yPos)=25: `Y coordinate of particle
rain(i-1,zPos)=(int(rnd(500)+1))+20: `Z coordinate of particle
rain(i-1,speed)=(int(rnd(3)+1)): `Speed of particle
`Position object for start
position object i, rain(i-1,xPos), rain(i-1,yPos), rain(i-1,zPos)
next i
return
_moveParticles:
for i=1 to 50
`Move particle down according to speed value, which makes a random effect
rain(i-1,yPos)=rain(i-1,yPos)-rain(i-1,speed)
`If particle goes too low, set new position
if rain(i-1,yPos)<-15
rain(i-1,xPos)=(int(rnd(40)+1))-20
rain(i-1,yPos)=25
rain(i-1,zPos)=(int(rnd(500)+1))+20
rain(i-1,speed)=(int(rnd(3)+1))
endif
`Position particle
position object i, rain(i-1,xPos), rain(i-1,yPos), rain(i-1,zPos)
next i
return
you might have to take the disable object zdepth statement out of there but I haven't tried it in a scene yet so i don't know.
by the way, you will have to make all of the drops fill the screen again because when you put them farther back, they take up less screen so you get a smaller box of rain that doesn't fill the whole entire screen, and you could also always add more rain drops too.
Awesome code by the way