oh
alright
notice how the blocks are the same height?
ok bPT is the coordinates for the destroyed block
thats bPT.Y, its always gonna be the same height
so, when what happens is, when mario goes to a certain point:
If pt.X >= 100 And pt.X <= 131
then the bPT value will be set. Once the bPT value is set, a 'destroyed block' image replaces(or goes on top of) the original block image.. Basically the bPT value is the coordinates for the destroyed block image. The Destroyed block image has a red question mark.
Ok
as for the BlockValue = 1, there's a bunch of DestroyedBLock images(actually Five, one for each block, the destroyed block images: DestroyedBlock1.bmp, destroyedblock2.bmp)
so what im trying to do is:
If mario gets between a certain point:
If pt.X >= 100 And pt.X <= 131
'In this case he would be underneath block 1
set the block value to 1
invalidate the form
when it goes to form1.paint:
it will say
e.drawgraphics(new bitmap(blockimg), bPT)
'by the way:
blockimg = "DestroyedBlock" & BlockValue ".bmp"
when the form loads it sets the bPT.Y to like 253 or something
because the blocks are all the same height
what i was trying to do was display 5 different blocks by using the blockValue and saying, on the first block display 'DestroyedBlock1'
on the second block display 'destroyedBlock2. But what happens is, the first block goes away and the second one appears :( i cant get it to work
bottm line:
the code you posted above is the collision detection stuff ;)