3. Now let’s make our navigation map! Add a new scene and add a “TileMap” as the root node. Name it “navigation_map”.

Add a new scene

Add a tilemap

Naming the node

Now it’s time to add the a tileset so we can paint our map.

Create a new tileset

Open the new tileset

Add an item to this tileset

Expand index 0 and load a new texture

Load in the “navigation_map_point.png” tile

Return to the tilemap by pressing it

IMPORTANT! We have to save the scene at the right place.

Press Ctrl+S to save, if you don’t know how to save the scene

Now it’s time to write some code! This will be the most complex part of the tutorial, so it will be explained by comments in the code.

Add a new script to the navigation_map

Accept the defaults

Your window will now look like this:

Pretty bland, huh?

Now here’s my code. Read through it, try to understand it. It’s okay if you don’t fully understand it — come back when we’ve finished the tutorial and perhaps it will make more sense.

Phew! That’s a tonne of code!

Replace that code in your editor with the code above and save it.

Glorious syntax highlighting

The hardest part of the tutorial is now over!