ne0Light Cocrea: https://cocrea.world/@ne0light
What are comment blocks?
Comment blocks are a way to help organize your scripts to make them more legible when coding. This allows for cleaner and more concise coding! They can also be used as notes on how the script itself functions.
This extension is made by LilyMakesThings.
What can they do?
Comment blocks can be placed within scripts and have no effect on the code within them. They have inputs on where you are able to insert text to make comments on your scripts.
How to use Comment?
First, install the comment extension located in the community tab.
There are 5 different blocks in the extension.
Connects to blocks from the top, does not run the script attached.
Connects next to or in between other stack blocks.
Connects by encasing other blocks within it.
Connects with the left input to a boolean block.
Connects with the left input to a reporter block.
Each block has an input to place a comment at, indicated by the part to the right named “comment”.
Let’s use these comment blocks in a script. Here is an example of implementation:
The comment blocks are implemented as labels for the script's purpose, within the “Movement” C Block, we can see the script for X movement and Y movement and insert a Multiplier for the speed. The comment tells us that the boolean functions as letting us move only when we are touching the color white. The Hat Block allows us to run the script while in the editor to quickly reset the X and Y positions of the player.
These comment blocks allow for more in-depth understanding of coding and more organized labeling. I hope you use this wonderful extension in your projects as well.