if you have access to pro, you can use typed arrays.
here is an example of them in action
sync on : sync rate 0
set text size 20 : set text font "verdana" : ink rgb(255,255,255),1
TYPE Monster
NUM AS INTEGER
NAME AS STRING
HPS AS INTEGER
x# as FLOAT
y# as FLOAT
z# as FLOAT
xrot AS INTEGER
yrot AS INTEGER
zrot AS INTEGER
ENDTYPE
dim Monster(1) as Monster
Monster(1).NUM=1
Monster(1).NAME="BugBear"
Monster(1).HPS=35
Monster(1).x#=0.0
Monster(1).y#=0.0
Monster(1).z#=0.0
Monster(1).xrot = 0
Monster(1).yrot = 45
Monster(1).zrot = 0
make object cube Monster(1).NUM,10
position object Monster(1).NUM,Monster(1).x#,Monster(1).y#,Monster(1).z#
rotate object Monster(1).NUM,Monster(1).xrot,Monster(1).yrot,Monster(1).zrot
position camera 0,30,-60
point camera 0,0,0
disable escapekey: while escapekey()=0
if upkey() = 1 then move object 1,0.1
if downkey() = 1 then move object 1,-0.1
if leftkey() = 1 then turn object left 1,0.3
if rightkey() = 1 then turn object right 1,0.3
Monster(1).x# = object position x(1)
Monster(1).y# = object position y(1)
Monster(1).z# = object position z(1)
Monster(1).xrot = object angle x(1)
Monster(1).yrot = object angle y(1)
Monster(1).zrot = object angle z(1)
center text object screen x(1),object screen y(1),"Name: "+Monster(1).NAME
center text object screen x(1),object screen y(1)+15,"XPOS :"+STR$(Monster(1).x#)
center text object screen x(1),object screen y(1)+30,"YPOS :"+STR$(Monster(1).y#)
center text object screen x(1),object screen y(1)+45,"ZPOS :"+STR$(Monster(1).z#)
center text object screen x(1),object screen y(1)+60,"X# :"+STR$(Monster(1).xrot)
center text object screen x(1),object screen y(1)+75,"Y# :"+STR$(Monster(1).yrot)
center text object screen x(1),object screen y(1)+90,"Z# :"+STR$(Monster(1).zrot)
sync
endwhile
delete object Monster(1).NUM
undim Monster(1)
end
now with DBC the least elegant solution is to use arrays and lots of them, they are global across functions so they stand the merit of use, even tho its more work it can do the same thing.
instead of declaring the typed array u have to make arrays for each aspect.
eg: Dim MonsterNum(1) : MonsterNum(1) = 100
etc..
If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself