what am i doing wrong with this code. It is supposed to make 50 explosions happen at random locations on the screen. Instead, it makes them all happen at the same place.This is for DBC(the resources all come with DB).
Thanks in advance
explode:
`sync off
r=18
for i= 1 to 50
randomize 12
x=rnd(13)
y=rnd(13)
z=rnd(200)
load object "explode.x",r
position object r,x,y,50
load 3dsound "explode.wav",i
position sound i,x,y,50
position listener camera position x(),camera position y(),camera position z()
play sound i
play object r
r=r+1
sync
next i
return