"Frontline" question

BlitzPlus Forums/BlitzPlus Programming/"Frontline" question

here you go dude...some basic arrays and x y positioning

Graphics 1024,768,32

SeedRnd MilliSecs()

;two armys of 10 command bases, Blue and Red armys 
;First in array is # 1 To 10, second is x position, third is y position

Dim an(10,3)
Dim bn(10,3)


For x=1 To 10
an(x,0)=x 
an(x,1)=Rnd(300,400)
an(x,2)=Rnd(50,70)*x
Next

For x=1 To 10
 bn(x,0)=x
 bn(x,1)=Rnd(405,500)
 bn(x,2)=Rnd(50,70)*x
Next

For c= 1 To 10
Oval an(c,1),an(c,2),5,5,1
Oval bn(c,1),bn(c,2),5,5,1
Next

px=350:py=0
pbx=450:pby=0

For c= 1 To 10

Color 0,0,255
Line px,py,an(c,1),an(c,2)

Color 255,0,0
Line pbx,pby,bn(c,1),bn(c,2)

px=an(c,1): py=an(c,2)
pbx=bn(c,1):pby=bn(c,2)

Next


WaitKey


Cheers!