6 Replies Latest reply on Sep 8, 2010 2:17 PM by Ned Murphy

    Collision Between Arrays?

    erikvasconcelosjansson

      Hi!

       

      I am trying to get a collision between an array of movieclips but it isnt doing well =S.

       

      Here is where I am now:


      for(i=0; i<bulletArray.length; i++){

       

           if(_root.bulletArray[i].hitTest(_root.enemy))

       

           {
               unloadMovie(bulletArray[i])
                _root.enemy.lives -= bulletDMG

       

           }

       

      }

       

      This code works, but it is only colliding with one object. I have made an Array called: _root.enemyArray.

      I have tried to make an for statment inside the current one without sucess.

       

      Any help is greatly appreciated!