# Need help with scripting my platformer game

**URL:** <https://forum.kirupa.com/t/need-help-with-scripting-my-platformer-game/300361>\
**Category:** flash\
**Created:** [November 19, 2009, 7:28pm UTC](https://forum.kirupa.com/t/need-help-with-scripting-my-platformer-game/300361 "2009-11-19T19:28:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexcookie](https://avatars.discourse-cdn.com/v4/letter/a/ce7236/32.png) [@alexcookie](https://forum.kirupa.com/u/alexcookie)\
**Post date:** [November 19, 2009, 7:28pm UTC](https://forum.kirupa.com/t/need-help-with-scripting-my-platformer-game/300361/1 "2009-11-19T19:28:01Z")

</div>

Hey!

Ok, so I have my player, I have my enemy, and I want to make it so that when I hit “A”, the player attacks and if its close enough to the enemy, the enemy dies. I’ve found how to do this in AS2, but not AS3. Any suggestions? Thank you! :mario:
