# Pinball Question

**URL:** https://forum.makecode.com/t/pinball-question/2590
**Category:** Help
**Created:** [June 30, 2020, 5:29pm UTC](https://forum.makecode.com/t/pinball-question/2590 "2020-06-30T17:29:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [June 30, 2020, 5:29pm UTC](https://forum.makecode.com/t/pinball-question/2590/1 "2020-06-30T17:29:44Z")

</div>

> **[Pinball](https://arcade.makecode.com/34477-62589-80897-95859)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I am trying to create this pinball game (hope you like it - A to swing the ‘paddles’) and I have a problem. If someone holds down A, the ball can never go down the hole. Other than that, the game is finished! 🎮

---

<div class="post-metadata">

### Author: ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)
#### Post date: [June 30, 2020, 6:22pm UTC](https://forum.makecode.com/t/pinball-question/2590/2 "2020-06-30T18:22:09Z")

</div>

woah this looks so cool!

and for your problem - hmmmm could you have a variable like “pedal moving” and set it to a number. Then when the ball hits the pedal, in your Player/Bumper overlaps code, you can add another check inside your “up?” code:

1. if “pedal moving” is greater than zero AND it’s “up?”, you give the ball a vy (like you do now).
2. If “pedal moving” is zero but it’s “up?”, maybe reduce its vy by a fraction? That way it won’t stop immediately. You might have to tweak this XD

And on update, if pedal moving is greater than zero, subtract one from it. And if A is released, change it to 0.

I haven’t actually tried this out XD maybe this would work? let me know what you think!

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [June 30, 2020, 6:23pm UTC](https://forum.makecode.com/t/pinball-question/2590/3 "2020-06-30T18:23:19Z")

</div>

> [@livcheerful](#):
>
> woah this looks so cool!

Thanks!

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [June 30, 2020, 6:24pm UTC](https://forum.makecode.com/t/pinball-question/2590/4 "2020-06-30T18:24:52Z")

</div>

> [@livcheerful](#):
>
> let me know what you think!

I think it’s great! I will definitely try this.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [June 30, 2020, 6:41pm UTC](https://forum.makecode.com/t/pinball-question/2590/5 "2020-06-30T18:41:24Z")

</div>

Sadly, it didn’t work. But I still added more features.

New Version -

> **[Pinball](https://arcade.makecode.com/81220-48611-40524-25536)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)
#### Post date: [June 30, 2020, 6:43pm UTC](https://forum.makecode.com/t/pinball-question/2590/6 "2020-06-30T18:43:56Z")

</div>

By the way, hitting the ball against the bumpers (circles) give you one point. If the ball goes through the rhombus at the top (Jackpot) you get 50 points. (Hint - it is easier for the ball to go through the top of the rhombus)

---

<div class="post-metadata">

### Author: ![livcheerful](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/livcheerful/32/3509_2.png) [@livcheerful](https://forum.makecode.com/u/livcheerful)
#### Post date: [July 1, 2020, 6:18pm UTC](https://forum.makecode.com/t/pinball-question/2590/7 "2020-07-01T18:18:09Z")

</div>

more bumpers!!! yay 😃
