Nautilus Tutorial: Hello World!

Disclaimer: only the console version works as of v0.6.2 and below. In v1.0, the valour version will work

Welcome to the first Nautilus Tutorial. Here, we will show you how to create a simple Hello World program.

Hello Console

The first one we will do will be super quick!

To start, go to the "Debugging" section in the Block Selection Menu. Grab a "Clear console" node, and drag it onto the canvas.

Your canvas should look like this:

Next, grab a "Print to console" block and drag it below the clear console block. They should snap together.

Finally, go to "Text" in the menu, and grab a basic text block:

Take that block, and snap it to the right of the print block. It should snap together. Click in the little bubble, and put "Hello World!" in it.

Your finished code should look like this:

Now, click "Run" and look in the console! It should say "Hello World!"

Expanding on this:

Change the text from hello world to whatever you want! Maybe add more print blocks? It's all up to you!


Hello Valour

This one is a little more complex, but you can do it! Let's start by clearing our canvas except from the clear console block. If you don't have one, add one from the "Debugging" section.

Now, go to "Valour" and grab a "Message received" block. Place it so it snaps to the clear console block. Grab a basic text block from "Text", and snap it to the right of the message block. Your canvas should look like this:

Change the text bubble to say "!hi". This will be the command that summons our bot.

Next, go to "Valour" and get a "Message content" block. Place it INSIDE of the message received block, to the right of "do".

Listen up! Get 8 blocks:

  1. 3 basic text

  2. 1 "create text with", found in "Text"

  3. 2 "Message part:" from "Valour"

  4. 1 "Planet" from "Valour"

  5. 1 "Channel" from "Valour"

Phew, you got all of that? Now, instead of explaining it all, heres an image on how to set it up:

To edit the number of units the create text block has, click the blue gear icon.

Now, press run, and on your main account, type "!h", and say hello to your bot!

Expansion:

Theres a lot to do to compact and expand upon this. Make your token a var so you only type it once, make the message path a var and set the var after every message. You could make the prefix a var, and use a "create text block" to change the prefix and/or command withen Valour.