# Plinko test 3

**URL:** <https://forum.makecode.com/t/plinko-test-3/2713>\
**Category:** Help\
**Created:** [July 9, 2020, 12:32pm UTC](https://forum.makecode.com/t/plinko-test-3/2713 "2020-07-09T12:32:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 9, 2020, 12:32pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/1 "2020-07-09T12:32:50Z")

</div>

> **[Plinko test 3](https://arcade.makecode.com/81426-22662-78292-47577)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

whenever I have 2 or more balls, I always see a ball frozen on top of one of my poles. You need 25 points to get another ball, whenever you spam the space bar, balls come down but some of the balls are never going to get down to the point slots.

I’m using block coding and have no idea how to use javascript

---

<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:** [July 9, 2020, 5:32pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/2 "2020-07-09T17:32:50Z")

</div>

The reason that some of the sprites get stuck is because of the tile collision code (my bad). You should use the _local_ `sprite` variable instead of the _global_ `mySprite` variable. The `mySprite` variable will always point to the last ball that was created so if more than one are created at a time, the collision code will only apply to the last one. The `sprite` variable on the other hand will always point to the ball that is doing the colliding. You can drag out that local variable like this:

 ![2020-07-09 10.30.02](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/084b8df77ef5937ae2e12d890e710674179db636.gif)

---

<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:** [July 9, 2020, 5:36pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/3 "2020-07-09T17:36:12Z")

</div>

Also it’s pretty cool to have a ton of balls going at once!

 ![2020-07-09 10.41.20](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/bf2f9e39b04816640bd953d5d0e98a9120b08307.gif)

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 9, 2020, 6:22pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/4 "2020-07-09T18:22:13Z")

</div>

Do I have to drag sprite into every mySprite box

---

<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:** [July 9, 2020, 6:29pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/5 "2020-07-09T18:29:17Z")

</div>

yep, you always want to use the local sprite inside that event

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [July 9, 2020, 6:31pm UTC](https://forum.makecode.com/t/plinko-test-3/2713/6 "2020-07-09T18:31:15Z")

</div>

thank you very much for helping me.  
I don’t even know how the math works in this game except for percentages and random 0-10
