Code should be something like this
set display mode 800,600,16:`set screen mode
sync rate 60:sync on:`set sync rate and turn it on
:
open to read 1,"setup1.txt":`prepare to read in the contents of the file into file slot1
global object1ob as string
global object1tex as string
:
read string 1,object1ob
read string 1,object1tex
read string 1,test$
object1x = val(test$)
read string 1,test$
object1y = val(test$)
read string 1,test$
object1z = val(test$)
:
load object object1ob,1:`load in model as object 1
SCALE OBJECT 1,300,300,300:`scale object1
load image object1tex,1:`load in the models texture as image 1
texture object 1,1:`texture it
close file 1
position object 1,object1x,object1y,object1z:`object 1's initial starting position on screen
set object speed 1,15:`object animation speed
loop object 1,5,25:`object 1 animation frame start and end
cls
do
position object 1,object1x,object1y,object1z
sync
set cursor 0,100:print object1x," ",object1y," ",object1z
if object1z=>10
object1z=object1z-0.05
endif
loop
And change the setup file to something like this and you won't have to parse out all of the unwantend info thats in your version.
cyborg.x
cyborg.dds
0
-6
40
--
I changed the model extension to .x as there was no .dbo.
Also notice I used read string for all of the info. Thats because all of the info in that file is in string form. You can't use read byte on a string. If you write a byte with the value of 40 to a file it looks like ( instead of 40. Using strings makes it easier for a person to read but more work for a computer to read it. It all depends on how you want to write the data to the file.