Advertisement
Guest User

Untitled

a guest
Jun 6th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (i=0; i < _root.Enemies.length; i++) {
  2.     curEnemy = _root.Enemies[i];
  3.     if(this.hitTest(_root.curEnemy)){
  4.         unloadMovie(this);
  5.         trace("hit")
  6.         _root.curEnemy.health -= 10;
  7.         trace("Enemy health is now " + _root.curEnemy.health)
  8.         if(_root.curEnemy.health <= 0){
  9.             unloadMovie(_root.curEnemy);
  10.         }
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement