After you have declared your type you can apply an array to its usage.
you can use it game elements as well, like this example.
rem ----------------------------------------------------------------------------
rem "loading" / "progress" / "construction" bars example
rem indi
rem dbp 5.5
rem friday 20th august 2004
rem ----------------------------------------------------------------------------
sync on : sync rate 60
set text size 13 : set text font "arial"
backdrop on
type LoadBar
name$ as string
x1 as integer
y1 as integer
x2 as integer
y2 as integer
bdr as integer
width as integer
height as integer
length as integer
endtype
dim LoadBar(3) as LoadBar
LoadBar(1).height = 8
LoadBar(1).width = 256
LoadBar(1).x1 = 10
LoadBar(1).y1 = 30
LoadBar(1).x2 = LoadBar(1).x1 + LoadBar(1).width
LoadBar(1).y2 = LoadBar(1).y1 + LoadBar(1).height
LoadBar(1).bdr = 1
LoadBar(1).name$ = "Loading Data Stream 1"
LoadBar(1).length = 0
LoadBar(2).height = 16
LoadBar(2).width = 384
LoadBar(2).x1 = 10
LoadBar(2).y1 = 80
LoadBar(2).x2 = LoadBar(2).x1 + LoadBar(2).width
LoadBar(2).y2 = LoadBar(2).y1 + LoadBar(2).height
LoadBar(2).bdr = 3
LoadBar(2).name$ = "Contacting Timer Bar 2"
LoadBar(2).length = 0
LoadBar(3).height = 32
LoadBar(3).width = 512
LoadBar(3).x1 = 10
LoadBar(3).y1 = 120
LoadBar(3).x2 = LoadBar(3).x1 + LoadBar(3).width
LoadBar(3).y2 = LoadBar(3).y1 + LoadBar(3).height
LoadBar(3).bdr = 8
LoadBar(3).name$ = "Construction Progress Bar 3"
LoadBar(3).length = 0
while myloop<5
rem cosmetic animation
rem replace with actual loading of media
for i = 1 to 255
LoadBar(1).length = i
Display_LoadBar(1)
i2=i
i2=i2*2
LoadBar(2).length = i2
Display_LoadBar(2)
i3=i
i3=i3*4
LoadBar(3).length = i3
Display_LoadBar(3)
if LoadBar(3).length>254
LoadBar(3).length=0
endif
text 1,1,STR$(myloop)+" of 5 loops"
sync
next i
cls
myloop = myloop+1
endwhile
text 1,1,"press esscape to exit"
sync
suspend for key
undim LoadBar(3)
end
function Display_LoadBar(Num)
box LoadBar(Num).x1,LoadBar(Num).y1,LoadBar(Num).x2,LoadBar(Num).y2,rgb(192,192,192),rgb(92,92,92),rgb(192,192,192),rgb(92,92,92)
ink rgb(32,32,32),1
box LoadBar(Num).x1+LoadBar(Num).bdr,LoadBar(Num).y1+LoadBar(Num).bdr,LoadBar(Num).x2-LoadBar(Num).bdr,LoadBar(Num).y2-LoadBar(Num).bdr
if LoadBar(Num).length > LoadBar(Num).width
box LoadBar(Num).x1+LoadBar(Num).bdr+1,LoadBar(Num).y1+LoadBar(Num).bdr+1,LoadBar(Num).x1+LoadBar(Num).width-LoadBar(Num).bdr-1,LoadBar(Num).y2-LoadBar(Num).bdr-1,rgb(255,255,0),rgb(255,255,0),rgb(0,255,0),rgb(0,255,0)
else
box LoadBar(Num).x1+LoadBar(Num).bdr+1,LoadBar(Num).y1+LoadBar(Num).bdr+1,LoadBar(Num).x1+LoadBar(Num).length-1,LoadBar(Num).y2-LoadBar(Num).bdr-1,rgb(255,255,0),rgb(255,255,0),rgb(0,255,0),rgb(0,255,0)
endif
ink rgb(255,255,55),1
text LoadBar(Num).x1+LoadBar(Num).bdr+2,LoadBar(Num).y1 + LoadBar(Num).height+2,LoadBar(Num).name$
endfunction