Alrighty, I’m making a missile command game, you can see the test version here.
I was wondering what would be the easiest/most effective way to hitTest the duplicated missiles with the duplicated rockets. Right now I’m using a for loop, the only problem with that is when there are multiple rockets on the screen using the for loop to hitTest the missiles it becomes very laggy. Any better ways to hitTest you think?
That’s only a test version, though the missiles you fire are removed when they go off screen. I’m just looking for a more efficient way to do the actual hitTest when they hit eachother
if (this != _level0.rocket) {
for (e = 0; e < 50; e++) {
if (this.hitTest(_root[“missile”+e])) {
this.removeMovieClip();
}
}
}
}
Heres a link to the .fla if you wanna poke around in it. I know it’s probably not written to well, I am going to re-write everything out so I can add all the features in easier.