Hey Guys,
I’m trying to setup a MC that has a hitTest that is triggered by multiple targets. Like how do you game developers do this. Like in a shooting game, the bullet will not hit only one target every time. It’s different all the time. So how would you know on a wide range of targets?
Thanks,
Najam D.
UPDATE++++++++++++++++++++++++++++++++++++++++++++ ++++++++
Best Work Around
One way is create the hittest code on one MC, and then use duplicateMovieClip to duplicate the targets. So, if you have an asteroid game you just build 1 asteroid w/ the hittest code.
I do not know how to make a global hit test. For example, if any MC hits another MC. I'm digging around for that now.
Here's a game I made that uses the hittest function. It's not global, but it works. I'd like to find something that makes the "spaceice" / asteroids detect each other w/o running scripts on each one that looks for every asteroid. It gets too slow.
There should be something that detects any MC hit, and then you can figure out what it is hitting. I'm working on it but could use a hand.
(And it specifically addresses your problem Pitchdog)
Thanks guys!.. I was trying to avoid using lots of loops but this tutorial has a pretty clean looking one so im thinking of using that...
Thanks again,