Like i told you before, i think it would be better if you also saved the positions of every object within the game into a text file for later viewing.
I've finally completed the code for doing this, and perhaps you'll add it to your program, and whoever else finds it useful. Enjoy
Rem Created by Merix
Rem Sample program for saving positions of all objects
make object cube 1,.5
position object 1, 20,50,75
make object cube 2, .5
position object 2, 500,200,100
do
for x = 1 to 50
if object exist(x)
positionx$ = str$(object position x(x))
positiony$ = str$(object position y(x))
positionz$ = str$(object position z(x))
n$ = "Object " + str$(x) + ".txt"
open to write 1, n$
write string 1, "Position x = " + positionx$
write string 1, "Position y = " + positiony$
write string 1, "Position z = " + positionz$
close file 1
endif
next x
wait key
end
loop
I need to mention one single bug.. This code will only work once. If you try it again, it wont work unless you delete all text files that start with "object" and end in a number..
It will not overwrite previous text files is basically what i'm trying to say.
I should also mention that i have the for loop only going to 50, if your game holds more than that for objects, just change the number to a higher amount.
[EDIT - I've just adjusted the code so that it will overwrite the old file... Here's the new code
make object cube 1,.5
position object 1, 30,50,75
make object cube 2, .5
position object 2, 500,200,100
do
for x = 1 to 50
if object exist(x)
positionx$ = str$(object position x(x))
positiony$ = str$(object position y(x))
positionz$ = str$(object position z(x))
n$ = "Object " + str$(x) + ".txt"
exists=FILE EXIST(n$)
if exists = 1 then delete file n$
open to write 1, n$
write string 1, "Position x = " + positionx$
write string 1, "Position y = " + positiony$
write string 1, "Position z = " + positionz$
close file 1
endif
next x
wait key
end
loop
]
In any case, hope you enjoy
WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.