|
-
Nov 23rd, 2007, 03:44 PM
#1
Thread Starter
New Member
[2005] Acummulator going down, unkown reason.
hey guys,
I'm having this weird problem, its a ugly block of code but it works for what I need it to do, minus this one tiny problem... I'm making a sort of space invaders game and when one of the enemies hits the building I need the HP accumulator go down, but it seems to be going down if I click one of the other enemies, if I click the first it stays at five, but if I click any enemy after that no matter where they are the accumulator goes down... I think my problem is here, any help? (sorry its so bad, I'm a beginner)
Code:
Private Sub TimerEnemy1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TimerEnemy1.Tick
Me.Enemy1.Top += 3
If Me.Enemy1.Top > Me.btnBuilding.Top And Me.Enemy1.Left > Me.btnBuilding.Left And Me.Enemy1.Right < Me.btnBuilding.Right Then
Me.Enemy1.Visible = False
Me.TimerEnemy1.Stop()
Me.intaccumulatorHP = intaccumulatorHP - 1
Me.lblUserHP.Text = intaccumulatorHP
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|