this has been killing me for ages and i need help before it institutialises me. the idea is my sprite will hit a certain point of the area and go to another works fine but when i go back to the first area it doesnt follow the data commands. the code is a example...click mouse and go from one area to another then click again and it goes back. it ignores the data codes and seems to do whatever it wants. any help appreciated
thanks
sync on
sync rate 30
set display mode 1024,768,16
world1:
cls
load image "grass08.bmp",1
load image "ash01.bmp",2
dim world1(5,5)
for y=0 to 4
for x=0 to 4
if world1data < 1 then restore world1data
read world1data
world1(x,y)=world1data
next x
next y
for y=0 to 4
for x=0 to 4
objnum = objnum + 1
make object plain objnum,5,5
position object objnum,x*5,y*5,75
if world1(x,y)> 0 then texture object objnum,world1(x,y) else color object objnum,0
next x
next y
do
if mouseclick()=1
delete image 1
delete image 2
delete object objnum
undim world1(5,5)
goto world2
endif
` X,Y,ZOOM
position camera 0,0,-10
xrotate camera 0.0
yrotate camera angle#
zrotate camera 0.0
sync
loop
world2:
cls
load image "grass08.bmp",1
load image "ash01.bmp",2
dim world2(10,10)
for y=0 to 9
for x=0 to 9
if world2data < 1 then restore world2data
read world2data
world2(x,y)=world2data
next x
next y
for y=0 to 9
for x=0 to 9
objnum = objnum + 1
make object plain objnum,10,10
position object objnum,x*10,y*10,75
if world2(x,y)> 0 then texture object objnum,world2(x,y) else color object objnum,0
next x
next y
do
if mouseclick()=1
delete image 1
delete image 2
delete object objnum
undim world2(10,10)
goto world1
endif
position camera 0,0,-10
xrotate camera 0.0
yrotate camera angle#
zrotate camera 0.0
sync
loop
world1data:
data 1,2,1,2,1
data 2,1,2,1,2
data 1,2,1,2,1
data 2,1,2,1,2
data 1,2,1,2,1
world2data:
data 1,1,1,1,1,1,1,1,1,1
data 2,2,2,2,2,2,2,2,2,2
data 1,1,1,1,1,1,1,1,1,1
data 2,2,2,2,2,2,2,2,2,2
data 1,1,1,1,1,1,1,1,1,1
data 1,1,1,1,1,1,1,1,1,1
data 2,2,2,2,2,2,2,2,2,2
data 1,1,1,1,1,1,1,1,1,1
data 2,2,2,2,2,2,2,2,2,2
data 1,1,1,1,1,1,1,1,1,1
Daedalus