Easiest way to explain is with pictures
2D TILE EDITOR
3D WORLD IT IS SUPPOSED TO CREATE
See how it is positioning it substantially different in the 3d world?
2D EDITOR SAVE FUNCTION
Function savefile(savefilename$,savefilenumber)
savefilename$ = "../First Game/" + savefilename$
if file exist(savefilename$) then delete file savefilename$
open to write savefilenumber,savefilename$
For y=0 to 9
For x = 0 to 9
write word savefilenumber, tiles(x,y).base
set cursor 650,570
ink rgb(255,255,255),0
if x > 5
print "x > 5"
xpos = x - 5
xpos = 5000+(xpos*500)
endif
if x < 5
print "x < 5"
xpos = 5000-(2500-(x*500))
endif
if y > 5
print "y > 5"
zpos = y - 5
zpos = 5000+(zpos*500)
endif
if y < 5
print "y < 5"
zpos = 5000-(2500-(y*500))
endif
rot = tiles(x,y).rot
ypos = 0
write word savefilenumber, xpos
write word savefilenumber, ypos
write word savefilenumber, zpos
write word savefilenumber, rot
Next x
NEXT y
close file savefilenumber
endfunction
3D WORLD LOAD FUNCTION
Function loadmap(filename$)
counter = 500
open to read 1,filename$
for x = 0 to 9
for y = 0 to 9
inc counter
read word 1,obj
read word 1,xpos
read word 1,ypos
read word 1,zpos
read word 1,rot
select obj
case 2:
load object "objects/houses/house.x",counter
position object counter,xpos,ypos,zpos
endcase
case 6:
load object "objects/houses/house_01.x",counter
position object counter,xpos,ypos,zpos
rotate object counter,0,180,0
endcase
endselect
next y
next x
close file 1
endfunction
I just can't seem to figure out why it is not loading up correctly in 3d. Any suggestions would be greatly appreciated. Thank you.