Results 1 to 6 of 6

Thread: [RESOLVED] What is wrong with my code? Make eneies shoot....

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2009
    Location
    Missouri
    Posts
    770

    Resolved [RESOLVED] What is wrong with my code? Make eneies shoot....

    Okay. I got only the left side to shoot.... But, the code i have set up should make both the left and right side shoot.... Also, only one enemy should shoot when it starts, but all 6 do! Here is my code:

    Code:
        If sn = 20 And noes <> Difficulty + 1 And noes <> 12 And noes < Difficulty + 1 Then
            Dim temparr2
        For temparr2 = 0 To enemyleftnum - 1
            If noes >= Difficulty + 1 Or noes = 12 Then
                Exit For
            End If
            
            If enemyleftstatus(temparr2) = "Alive Left" And enemyleft(temparr2) >= 0 And enemyshotstatusl(temparr2) = "" Then
                enemyleftstatus(temparr2) = "Shoot Left"
                noes = noes + 1
                enemyshotstatusl(temparr2) = "Shoot"
            End If
                
            If noes >= Difficulty + 1 Or noes = 12 Then
                Exit For
            End If
            
                Dim temparr3
                For temparr3 = 0 To enemyrightnum - 1
                    If EnemyrightStatus(temparr3) = "Alive Right" And enemyright(temparr3) <= 269 And enemyshotstatusr(temparr3) = "" Then
                        EnemyrightStatus(temparr3) = "Shoot Right"
                        noes = noes + 1
                        enemyshotstatusr(temparr3) = "Shoot"
                        Exit For
                    End If
                Next temparr3
        Next temparr2
        End If
    I also attached the project as well... Please help me!
    Last edited by Gamemaster1494; May 22nd, 2010 at 07:44 PM.
    Rate my post if i helped you!


    Button Configuration Control For VB6 GetAsyncKeyState
    I'm the 7th best high school programmer in the nation!(according to SkillsUSA Nationals)(Used C#.Net)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width