# Detect animation / melee attack

**URL:** <https://forum.makecode.com/t/detect-animation-melee-attack/15164>\
**Category:** Arcade\
**Created:** [August 31, 2022, 5:36pm UTC](https://forum.makecode.com/t/detect-animation-melee-attack/15164 "2022-08-31T17:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barry-Williams](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/barry-williams/32/5394_2.png) [@Barry-Williams](https://forum.makecode.com/u/Barry-Williams)\
**Post date:** [August 31, 2022, 5:36pm UTC](https://forum.makecode.com/t/detect-animation-melee-attack/15164/1 "2022-08-31T17:36:35Z")

</div>

I was thinking when you had a melee (e.g. sword) attack using an animation you could just use the animation state with an on overlap:

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c079f52adbf6240cc83c24d0c73ac8d9bf3cf285.png)  
or  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c71334fb488ea262e321ab458049a1586a2675b7.png)

But I cannot find anything like this.  
I know I can create a projectile that gets destroyed I just thought this might be a simpler way

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [October 18, 2022, 4:40pm UTC](https://forum.makecode.com/t/detect-animation-melee-attack/15164/2 "2022-10-18T16:40:23Z")

</div>

Interesting concept. I guess this is a good way to create what is essentially a collision shape that activates upon animation.
