# Recreating the while block

**URL:** <https://forum.makecode.com/t/recreating-the-while-block/10134>\
**Category:** micro:bit\
**Created:** [September 20, 2021, 3:55pm UTC](https://forum.makecode.com/t/recreating-the-while-block/10134 "2021-09-20T15:55:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [September 21, 2021, 4:43am UTC](https://forum.makecode.com/t/recreating-the-while-block/10134/2 "2021-09-21T04:43:51Z")

</div>

You might take a look at this post: [Creating an multi handler function in an extension - #2 by E-EnerG-Gamecentral](https://forum.makecode.com/t/creating-an-multi-handler-function-in-an-extension/10041/2)

Here’s my answer from there, which might actually fit:

> This may not solve your problems, but the MakeCode playground is a great tool to explore the block styles and prototype blocks. See: [https://makecode.com/playground](https://makecode.com/playground) .
> 
> About the closest example is has is the in-line [event handler](https://makecode.com/playground#events).

You may want to follow the link and:

1. Switch to the micro:bit view (The “Editor” drop down menu)
2. Pick “Events” in the Sample menu
3. Click `Run`
4. Select the Puzzle Piece palette to see what the examples look like. The “`on an inline event`” looks like a pretty good fit. It can be modified to have a parameter.

That being said, I’m not sure how easy/hard it is to get the behavior you want. I suspect it isn’t too bad.

Bill

---

_[View the full topic](https://forum.makecode.com/t/recreating-the-while-block/10134)._
