# Parry test

**URL:** <https://forum.makecode.com/t/parry-test/6800>\
**Category:** Game Design\
**Created:** [March 16, 2021, 4:05pm UTC](https://forum.makecode.com/t/parry-test/6800 "2021-03-16T16:05:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![XDlol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/xdlol/32/21235_2.png) [@XDlol](https://forum.makecode.com/u/XDlol)\
**Post date:** [March 16, 2021, 4:05pm UTC](https://forum.makecode.com/t/parry-test/6800/1 "2021-03-16T16:05:47Z")

</div>

> **[parry test](https://arcade.makecode.com/87820-48632-93314-30056)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I have completed the parrying mechanic for a cuphead recreation. Please let me know if you have any feedback/ways to make it better. It is hard at first, but you get used to it.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [March 16, 2021, 4:39pm UTC](https://forum.makecode.com/t/parry-test/6800/2 "2021-03-16T16:39:17Z")

</div>

Awesome! Quick tip:

The way you’ve written the code here will only work if there is only one ghost on the screen. You’re using the same variable “projectile” for each ghost, so whenever you create a new one the others are no longer in the variable and thus can’t be parried. If you make the update interval shorter in your game, you’ll start to see the bug.

You can fix it by changing this code:

 ![Screen Shot 2021-03-16 at 9.34.14 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/9/9d678139b61437819f9d86bb40ce1c6cf8ddf7c7.png)

To instead loop over all of the projectiles in the game:

 ![Screen Shot 2021-03-16 at 9.35.31 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/d5f424b4596c898c09c55ff82ba0d63429929707.png)

---

<div class="post-metadata">

**Author:** ![XDlol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/xdlol/32/21235_2.png) [@XDlol](https://forum.makecode.com/u/XDlol)\
**Post date:** [March 16, 2021, 4:40pm UTC](https://forum.makecode.com/t/parry-test/6800/3 "2021-03-16T16:40:35Z")

</div>

Ok, thanks! I’ll do that.

---

<div class="post-metadata">

**Author:** ![XDlol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/xdlol/32/21235_2.png) [@XDlol](https://forum.makecode.com/u/XDlol)\
**Post date:** [March 16, 2021, 8:48pm UTC](https://forum.makecode.com/t/parry-test/6800/4 "2021-03-16T20:48:01Z")

</div>

> **[parry test Updated](https://arcade.makecode.com/18175-12998-30854-51314)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

![Screenshot 2021-03-16 at 3.43.28 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/33327ffc42c22276607407d42fd5dace252c16fb.png)
