Step 1

Using text blocks

Programmers will often write comments inside their code so that anyone reading it can understand what each part of the program is supposed to do. Since our character script is growing larger, let's add comments to each section so that we can keep everything organised in here.

Go to Operators, and grab the first block under the heading Text. This is a text block, and we can write anything we want in there. As long as we keep it disconnected from the blocks inside the event blocks, the text won't show up anywhere in our game. Drag it out into the workspace.

We'll use this text block to make a comment about what each section of the program does -- type "This section is for making the character jump", "This section is for camera tracking", and other helpful comments into an empty text block above each section. Do this for each new chunk of blocks you add -- it will help make sure you don't lose your place in the script!

results matching ""

    No results matching ""