Flash Actionscript: Game Damage Transfer

Started by
1 comment, last by Kid4Today 18 years, 8 months ago
Hello ive provided a picture to try to better explain a complication i've been having: Image hosted by Photobucket.com What i would liek to do is so when SPCAEBAR is pressed, if these two smaller boxes are overlapping, the ememy will loose 10 damage im sure there are many ways to do this, but im not trying to get into anything too complicated, i just want the yellow guy to take 10 damage everytime teh space is pressed, given the conditions please help im desperate :)
Advertisement


Assume your Movie clips (MC) are like above. You have made a hit area MC and pull that onto your player MC. Now to check collision is easy.

if (player.playerHitArea.hitTest(enemy.enemyHitArea)){//do something}


Here is the source to a flash game I made while learning flash that using this same way to dectect hits.
thank you so much :)

This topic is closed to new replies.

Advertisement