Comment block

The Comment block allows you to add notes to your code to explain how it works and what it is designed to do. It has a text field where you can type the comment.

For example, this Conditional example below uses math blocks. It uses the Pythagorean theorem to calculate the distance between two objects. A Comment block has been added to give context, as it would otherwise take longer to work out the intent by looking at the math blocks alone.

Adding comments to your code is useful in the following scenarios:

  • Sharing templates with others
  • Putting reminders for yourself
  • Providing context to your code (If you ask for help from others when you're stuck, they first need to understand your code.)

When the project is played, the Comment block does not do anything code-wise. It is there for when you're working in the editor.

Still need help? Contact Us Contact Us