# Some problems about attacking in my action rpg game

**URL:** <https://forum.makecode.com/t/some-problems-about-attacking-in-my-action-rpg-game/22178>\
**Category:** Help\
**Created:** [September 1, 2023, 4:34pm UTC](https://forum.makecode.com/t/some-problems-about-attacking-in-my-action-rpg-game/22178 "2023-09-01T16:34:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nobrain](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nobrain/32/1078_2.png) [@Nobrain](https://forum.makecode.com/u/Nobrain)\
**Post date:** [September 1, 2023, 4:34pm UTC](https://forum.makecode.com/t/some-problems-about-attacking-in-my-action-rpg-game/22178/1 "2023-09-01T16:34:35Z")

</div>

[My game](https://arcade.makecode.com/S58107-43584-13435-24131)

I have my character attacking 1 enemy at a time even why my slash is surely overlaying with 2 enemies. I know there is a problem about “For element value of array x” but dont know how to do it else. Have made a character called slash which is the blade animation. If value of array of enemies touch the slash they get damaged. It is an rpg game so there are a lot of numbers, but i put comments there to guide you  
Btw the game will still be balanced even without that mechanic, so its not crucial, i think (still havent planned out the full game), but still its not ideal to not fix.

---

<div class="post-metadata">

**Author:** ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)\
**Post date:** [September 1, 2023, 4:35pm UTC](https://forum.makecode.com/t/some-problems-about-attacking-in-my-action-rpg-game/22178/2 "2023-09-01T16:35:14Z")

</div>

Would you mind sharing a link to the game? There could potentially be a few different ways to solve this issue.
