PDA

View Full Version : getBounds



Pattt
January 12th, 2005, 05:25 PM
Hi..
I'm working with a game, and a gun shot gonna hit the enemy.
When it do that, the hit animation gonna play. but it starts to play
when it not hit the enemy, it plays when it hitTest the enemy-movieclip bound, that blue lines around.
Then i heard about getBounds.. Can it helps me? And how do the hitTest
gonna look like?
//Patrik

lunatic
January 12th, 2005, 05:31 PM
I don't think getBounds is what you want here. I think you should make an empty movieclip that is smaller than the box around the enemy and hide it within the enemy movieclip. Then you can use the hitTest command on that empty movieclip. Basically what you are doing is setting up a smaller target.

:hr: