# Is there a way to make a button you can step on to activate it in a platformer?

**URL:** <https://forum.makecode.com/t/is-there-a-way-to-make-a-button-you-can-step-on-to-activate-it-in-a-platformer/19071>\
**Category:** Help\
**Created:** [April 10, 2023, 5:08pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-a-button-you-can-step-on-to-activate-it-in-a-platformer/19071 "2023-04-10T17:08:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)\
**Post date:** [April 10, 2023, 5:08pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-a-button-you-can-step-on-to-activate-it-in-a-platformer/19071/1 "2023-04-10T17:08:33Z")

</div>

I am trying to make a button to press on when the character steps on it to activate a door. Is there any way to do this?

---

<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:** [April 11, 2023, 7:46pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-a-button-you-can-step-on-to-activate-it-in-a-platformer/19071/2 "2023-04-11T19:46:34Z")

</div>

Here’s some sample code for ya! There are comments inside explaining it, but let me know if you need any more help!

> **[button-open-door](https://arcade.makecode.com/S23557-52808-19446-57864)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)\
**Post date:** [April 12, 2023, 4:01pm UTC](https://forum.makecode.com/t/is-there-a-way-to-make-a-button-you-can-step-on-to-activate-it-in-a-platformer/19071/3 "2023-04-12T16:01:31Z")

</div>

Thank you!
