Building with Blocks


The GetWrite editor is based on a system of blocks, which you can use to express the control flow of your project. They are the elements that make up your actual project's behavior. In this article, we'll go over the different types of blocks and how to use them.


How to use the block editor

The block editor is the main part of the GetWrite editor. It's where you'll spend most of your time when working on your project. It's made of two parts, the block palette and the block workspace. The block palette is the part on the left, where you can find all the different types of blocks. The block workspace is the part on the right, where you can place blocks and connect them to each other.

To get to the block editor, simply open a project and look at the left part of the screen. This is where the block editor is located.

A view of the block editor.

To open the block palette, click on a colored category on the sidebar inside of the block editor. For example, we're clicking on the "GetWrite" category here. All available blocks in that category will appear in a hovering window.

To place a block, simply drag and drop it from the palette to the workspace. It will appear right where you want it inside of the block workspace. You can then connect it to other blocks by dragging the block to the sides of any other block that's currently present.

You can right-click any block to open a menu with options to delete the block, duplicate it, or change its properties.

Note that every block needs to either be connected to the "begin of experiment" block or to another block that's connected to this beginning block. If you try to run your project without this connection, it won't work, so make sure to always have all your blocks connected to the beginning block.

Some blocks have connectors inside of them. These connectors are used to attach arguments to the block. For example, if you want to display an image, you need to attach a file to the block to let it know what image to display.


The different types of blocks

In general, the GetWrite Builder features 3 different types of blocks: GetWrite-specific control blocks, reference blocks and blocks that feature operational logic. Let's go over each of these types of blocks.

  • GetWrite: These blocks are specific to the GetWrite Builder and are used to control the behavior of your project. They are the blocks that you'll use the most when building your project. They include blocks to display text, images, videos, audio, and more. They also include blocks to control the flow of your project, such as blocks to wait for the user to proceed or delay something for a specific amount of time in milliseconds.

  • Files and Lists: These blocks are used to reference files and lists that you've uploaded to your project. They are needed to attach files to blocks that need them, such as the "display image" block.

  • Operations: These blocks can be used in many different ways. They include blocks to perform loops, operations on text, the possibility to define numbers, paragraphs and more. A special block is the "# of current iteration" block. This one is only important in combination with loops, where it will query the amount of times the loop has been run so far. It starts counting at zero, and when outside of a loop, it will always return zero.

Important Tip! You can hover over each of the blocks with your mouse to get a brief explanation of what the block does.