Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

thank you thank you thank you :D

how do u get more than 1 block to appear?

if oyu have to do more than 1 e.graphics.draw image statement, i got it

but if you dont have to, can u tell me?

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

  • *Experts*
Posted

By appear you mean just have another box drawn?

Then, yes, e.graphics.drawimage is all you need to draw another one.

Correct me if im talking about the wrong thing, im not sure what you mean :)

Posted (edited)

actualy, you can't do that :(

'Declarations

   Dim BlockImage As String
   Dim BlockImage2 As String
   Dim BlockImage3 As String
   Dim BlockImage4 As String
   Dim BlockImage5 As String

 

i declaraed '5 block images' in declarations

 

'Form1.Paint
If Not bPT.X = 0 Then
           If bPT.X = 118 Then
               Dim BlockImg As New Bitmap(BlockImage)
               BlockImg.MakeTransparent(Color.Lime)
               e.Graphics.DrawImage(New Bitmap(BlockImg), bPT)
           End If

           If bPT.X = 148 Then
               Dim BlockImg2 As New Bitmap(BlockImage2)
               BlockImg2.MakeTransparent(Color.Lime)
               e.Graphics.DrawImage(New Bitmap(BlockImg2), bPT)
           End If
       End If

 

i only did this for 2 blocks, they dont work.. by the way under Form1.Load, i Changed this:

'Form1.Load
       BlockImage = "DestroyedBlock1.bmp"
       BlockImage2 = "DestroyedBlock2.bmp"
       BlockImage3 = "DestroyedBlock3.bmp"
       BlockImage4 = "DestroyedBlock4.bmp"
       BlockImage5 = "DestroyedBlock5.bmp"

 

Even tho i did it for 2 blocks, it still wont work :( it will only display 1

 

 

btw. when i said if bPT.X = 118 or 148, look in the collision dection thing u posted above... its just saying that "if you hit block 1" or "If you hit block2"

Edited by ThePentiumGuy

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Posted

and i took away the block value thing

what i THINK is happeining is when you go under form1.paint and oyu say If bPT.X = 118 Then 'blah

and you say If bPT.x = 148 Then 'blah

 

whats happenin is: when u hit the first block bPT.X = 118, so it paints the destroyed block

and when u hit the 2nd block bPT.X = 148, so it paints the destroyed block2. whats happenin is.. form1.paint does the If bPT.x = 118 events only when its 118, but when it changes, it removes those events so what im gonna do is:

 

  
If pt.Y = 265 Then 'if mario is in the height of the box
           If pt.X >= 100 And pt.X <= 121 Then

               bPT.X = 118
               hitfirstblock = true
               Me.Invalidate()

im just gonna say something like in form1.paint

if hitfirstblock = true then

'blah

My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!)

vbprogramming.8k.com

My Project (Need VB.NET Programmers)

http://workspaces.gotdotnet.com/ResolutionRPG

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...