Hi i just have a question about AS2 arrays and use in games, i am making this game where a bullet(attachedMovieClip) is shot out and passes over a duplicated zombie character(duplicated movie clip) i have made an array for them called zombieArray() and i am trying to run a hitTest between them, heres the code.
iBullet.onEnterFrame = function() {
this._x += this.xSpeed;
this._y += this.ySpeed;
for(x in zombieArray){
if (this.hitTest(_root[zombie[x]])) {
callGore(this,"head");
createGibs(this,"head");
this.removeMovieClip();
//_root.zombieArray.splice(x, 1); should remove zombie from array
}
}
…blah blah the funtion goes on. all the other functions work its just wont register the hit with the movieclips. Pease can someone help me out:(