PDA

View Full Version : HitTest Everything


bestpilotever
07-09-2006, 09:02 PM
I have been checking out this site for awhile and I want to say thanks to everyone with their free advice. I have a many problems but my first is that I need a way to detect when the player interacts (hittest) with everything. I looked around and I don't undertstand anything thus far. (don't assume I know anything) Please help. Thanks.

Sunny13
07-10-2006, 02:59 PM
go to http://www.actionscript.org/forums/showthread.php3?t=109884 and see my post .. it may help you

bestpilotever
07-10-2006, 08:53 PM
Thank you for your respose, but I feel like I am missing something.
Can I not type in something like:

if (player.hitTest(everything)){
//do whatever
}
in place of eveything can I not place some code to hit test every other MC in the frame?

Sunny13
07-11-2006, 05:04 PM
count the hittest for all the elements on stage except itself.... number of clips can be counted as for(var i in this){
count++;
} try this... count will be one less.