Block formatting help

I am making an extension, and there are four blocks: (so far)


As you can see, the first two might be a tad bit tall, so is it possible for it to do something like this:

check for achievement get named "achievement" with condition <false>
with title "Title" and description "Description!" and icon [icon]

So the block isn’t as tall?

1 Like

Well adding expandable arguments helped: (a bit)
image
But they still get really tall:

We don’t currently support specifying arbitrary line breaks, though it’s something I’ve thought about / would like to add or see added eventually (my understanding is that the spacing logic has been cleaned up quite a bit in recent versions of blockly which should make it easier to implement).

The one option we do have is to specify that it should all be displayed as one line with //% inlineInputMode=inline (or vice versa, forcing to display with multi line with //% inlineInputMode=external).

In this case, for now, I would suggest reviewing the blocks and trying to pare them down a bit; it looks like you’re trying to implement an achievement system sort of thing, and by the looks of it you’re using multiple things as keys for those achievements - e.g. the boolean check is taking in a bunch of parameters to compare against achievements.

Usually, you would likely want to keep it to only a single ‘primary’ key – e.g. the achievement name – for most of the blocks, and have one (or multiple) blocks where you use that name to specify the other properties. That way you would be able to have the the boolean block be something like check {name} is achieved {true/false}, and not have to keep on describing the title / icon / etc every time you try to access it.

1 Like

Wow what is that for?

1 Like

Thanks for the advice - yes I’m trying to wrap displaying that you got an achievement, remembering it, and resetting it.

I was trying to aim for something like this:
image

If you remove the reset achievement block, then it will only show the achievement once.

This extension is so cool! will you ever/when will you post it on the forum? Suggestion, you don’t have to do it, but maybe add an option to include a custom tone or something to further signify the achievement.

1 Like

Yes, I want to add some music to it before I post it. :slight_smile:

1 Like