This content has been marked as final. Show 4 replies
yes, make all the body part movieclips subclips of one movieclip. you could then execute one hitTest between the head and the movieclip that contains the body part subclips.
I see what you mean and have been trying to implement it however i cant find a way in which it would be possible. Could anyone possible give me some options because im stuck.
So far i have made the head in a separate movie clip, however it detects collisions constantly. I make it so that the mcHead movieclip roams around, and the snake body simply follows it (see the attached code) however they collide all the time somehow.
Thankyou for your help
what's mClip? if it's a chlid of _root, and contains nothing other than the body movieclips, you can use a hitTest() between the head and mClip.
otherwise, create an empty movieclip and attach your body part movieclips to that movieclip and use a hitTest() between it and the head.
I have managed to get the collision detection working but there is another problem. I have made this Picture which shows that when in some places, the snake body movie clip and the collision detection movieclip are overlapping when i don't i dont want a collision to be detected. Can you see?
Is there any way of preventing this?? for example can you make the area of the movie clip fit exactly to the objects inside them??
Thankyou so much for your contributions