array images? i need help

p_dog_2007

Active member
Joined
Sep 6, 2003
Messages
28
Location
MIchigan
I am making a game with tiles and when i draw the map i draw the tiles one by one, after one is drawn, it makes the next in the next location, so theres just one image changing locations and images(form a string). i need it to keep the other ones there and draw the next one.

i think i wnt to do this with an array but im not shure.
what should i do? :confused:
----------------------------------------------------------
dim tile as string
----------------------------------------------
in the map load sub:

do

if textbox=1 then
tile=(location of picture)
end if
if textbox=2 then
tile =(location of pic.)
end if
-------------------------------------------------------
in the form1 paint sub:

e.graphics.drawimage(new bitmap(tile)tilept.x, tilept.y)

----------------------------------------------------------


thanks for your time
 
Last edited by a moderator:
problem solved:

Code:
        For x = 0 To numRows
            For y = 0 To numColumns
                e.Graphics.DrawImage(Tiles(x, y), x * 30, y * 30)
            Next
        Next

pdog - ill email you the example :-D
thanks to Darc for helping me out
 
Back
Top