ok so i got this game that i am building...
for some reason the collision detection is not working..
the problem occurs when the enemies are duplicated; the original movie clip works..
so i duplicate a enemy after its death so its splits in two enemies....
_root.enemies.enemy.duplicateMovieClip (_root.enemies.enemy, "_root.enemies.enemynew" + _global.enemycount, _global.enemycount + 50);
_root.enemies["enemynew" + _global.enemycount]._x = this._x + 30;
_root.enemies["enemynew" + _global.enemycount].memove = 0;
_root.enemies["enemynew" + _global.enemycount].phit = 0;
_root.enemies["enemynew" + _global.enemycount].memove2 = 1;
_root.enemies["enemynew" + _global.enemycount].health = 6;
_root.enemies["enemynew" + _global.enemycount].walkrand = Math.floor(Math.random() * (3 - 1)) + 1;
_root.enemies["enemynew" + _global.enemycount].gotoAndStop('spawn')
;
_global.enemycount ++
/////// ok so this code works and the enemy walks toward the player but does not strike the player, or get hit by the player...
things i know....
health resets fine,
memove resets,
this is how the collision detection is coded..
if(_root.player.playerin.spot1.hitTest(t his.hitspot)){
this.gotoAndStop('hit');memove = 0;
_root.sfx1 = new Sound(sfx1);_root.sfx1.attachSound("hitp ");
//_root.ms.stop("music1");
_root.sfx1.start(0,1);
health-=2;}
any thoughts?