more happy pic stuff
happy pic stuff

look at this NOW

click here.


Option Explicit Dim whichbutton As Integer Dim gameover As Boolean Dim moonindex As Integer Dim lightindex As Integer Dim hits As Integer Dim misses As Integer Const spacebar = 32 Const jkey = 106 Const kkey = 107 Dim missiles As Integer Dim unlucky As Boolean Dim carrotflying As Boolean Dim keycode As Integer Public Sub keypress(KeyAscii As Integer) If KeyAscii = spacebar Then carrotflying = True End If whichbutton = KeyAscii End Sub Public Sub mmuFileAnimation_Click() Call initialize Do DoEvents Call moveprojectiledevice 'moves ryoko Call movecarrot 'moves the carrot missile Call wait Loop While Not gameover End Sub Private Sub form_keyup(keycode As Integer, shift As Integer) whichbutton = 0 End Sub 'End Sub Public Sub moveprojectiledevice() If whichbutton = jkey Then If imgprojectiledevice.Left > 50 Then imgimgprojectiledevice.Left = imgprojectiledevice.Left - 35 End If End If If whichbutton = kkey Then ElseIf imgprojectiledevice.Left < (frmgame.ScaleWidth - 450) Then imgprojectiledevice.Left = imgprojectiledevice.Left + 35 End If End If End Sub Public Sub movecarrot() If carrotflying Then If whichbutton = spacebar Then imgcarrotmissile.Left = imgprojectiledevice.Left + 2 imgcarrotmissile.Top = imgprojectiledevice.Top End If imgcarrotmissile = imgprojectiledevice.Top - 2 '========================== 'this mass checks for whether the carrot flew off the screen or not If imgcarrotmissile.Top < -450 Then unlucky = True 'this keeps track of misses in the score carrotflying = False 'this resets gun End If 'this is for missile animation if it moves 'do you have index numbers? 'Set imgcarrot.Picture = imgmissile End If End Sub Public Sub initialize() gameover = False carrotflying = False imgcarrotmissile.Top = frmgame.ScaleHeight imgcarrotmissile.Left = 0 imgmoon.Left = -500 imgmoon.Top = 0 unlucky = False End Sub Public Sub wait() Dim i As Long For i = 1 To 55554 Next i End Sub Private Sub mmuFileExit_Click() gameover = False End End Sub Private Sub quit_Click() End End Sub


Put this in initialize Do Do events call movegun call movemoon 'the target call movemissile call checkforhit call wait Loop while not gameover Private sub form_keypress (KeyAscii as integer) if KeyAscii=spacebar then missilefird=true endif whichbutton=KeyAscii end sub private sub Form_Keyup ( do you have this? missilefired=false in the ==== area.....before the ani. part... check for a hit -did it miss? -add 1 to the miss -post it -did it hit? -is missile within range of target? -check left and top values -end round -gameover=true Elseif missile.left > target.left-200 and if nissile.left < target.left +200 then if missile.top> target.top-200 and missile.top< target.top+200 publuic sub checkforhit if unlucky then misses=misses=1 lblmisses=misses unlucky=false elseif (imgmainlight.eft>(imgmoon.left-200)) and (imgmainlight.left<(imgmoon.left+200)) then if (imgmainlight.top>(imgmoon.top-200)) and (imgmainlight.top<(imgmoon.top+200)) then gameover=true nits=hits+1 lblhits=hits



 

1