0

Currently as test code i am useing this

  While (ColumnCount <=6)
    For r = 1 To rows
      For c = 1 To columns

        GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
        boxes[r][c] = Shapes.AddRectangle(width,height)
        Shapes.Move(boxes[r][c], 620, 100)

      EndFor
    EndFor

But for my actual game i want to pull images randomly from an array like above. But how do manually write an array like that which i can store images in?

also how can i give the image a specific value? (a number)

Any help in as much detail as possable would be great!

1 Answers1

1

Funny, Someone else just asked the same question here: https://social.msdn.microsoft.com/Forums/en-US/e15a2091-6806-497e-b77d-b00e5d7b32be/multidimensional-arrays?forum=smallbasic

So what exactly are you trying to do? If you want to pull the images from the array, you could just do this:

Shapes.Move(boxes[1][1],100,100)

What exactly do you mean by giving a image a value? Like this?

Image[1] = Shapes.AddImage(img)

Hope this helps a little at least :D

Zock77
  • 951
  • 8
  • 26
  • Haha, that was me lol. Under a bit of pressure to get this implemented. I am trying to make a card game so i need to generate a random deck of cards. So then i cant pull them off and display the image. But to the image i have to store a value (Value of the playing card). So i can then calculate the total later in the game. – Mark O'Hara Oct 18 '14 at 11:24