# Help with extension

**URL:** <https://forum.makecode.com/t/help-with-extension/45571>\
**Category:** Help\
**Tags:** graphics-and-math, extension\
**Created:** [August 24, 2026, 11:02pm UTC](https://forum.makecode.com/t/help-with-extension/45571 "2026-08-24T23:02:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [August 25, 2026, 8:26pm UTC](https://forum.makecode.com/t/help-with-extension/45571/2 "2026-08-25T20:26:44Z")

</div>

if i’m reading this code right, it sounds like in problem 1 you’re trying to create a block that basically does this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/0/2/02e40959a92b782204f9c95b5f0cfe222afc9e0d.png)

where `someBooleanExpression` is an expression that could change over time.

well, that’s not possible. when you call a function with a boolean argument, the value of that boolean will be captured in the initial call and will never change.

if you wanted to do something like that in javascript, you would write your function like this:

```ts
function conditionalOnGameUpdate(condition: () => boolean, handler: () => void) {
    game.onGameUpdate(() => {
        if (condition()) {
            handler()
        }
    });
}

```

the condition argument in this example is a function that returns a boolean. that function gets called every frame and allows the expression to be re-evaluated.

unfortunately, while this is totally doable in javascript, there is no way to make a block that does this (actually there is one block that works this way and it’s [pause until](https://forum.makecode.com/t/richards-arcade-tips-3-the-pause-until-block/28794), but it’s special and you can’t replicate it in an extension)

as for problem 2, i have no idea what you’re trying to do here. can you draw a picture of what your block should look like and maybe give some sample code to show how it’s used?

---

_[View the full topic](https://forum.makecode.com/t/help-with-extension/45571)._
