Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'Randomised' map fill
#2
get the locations of the tiles on the tile sheet and blt them to the .ground using some for loops.

Code:
For x = 1 To max_mapx
    For y = 1 To max_mapy
        f = Int(Rnd(3) * 3)

        With Map.Tile(x, y)
            Select Case f
                Case 0
                    .Ground = ' tile 1
                Case 1
                    .Ground = ' tile 2
                Case 2
                    .Ground = ' tile 3
                Case 3
                    .Ground = ' tile 4
            End Select
        End With
    Next y
Next x

Obviously just a mock up but that's how I would do it.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)