Skip to main content

Posts

Featured

Setting up Global Scripts in Godot 4 (a.k.a. Autoloads)

 When I first started using Godot, I had no idea how to pass data between scenes cleanly. I ended up with messy spiderwebs of node paths, signals, and function calls — just to do something simple like update the player’s score or share a variable. If that sounds familiar, this tutorial is for you. I’m going to show you how to set up a global script in Godot using something called an autoload . This lets you create a script that lives in the global namespace — meaning you can access it from any other script in your entire project , no matter where you are in the scene tree. It's simple to set up, but incredibly powerful. Once I started using it, everything clicked. Lets create a new script. Right-click in the FileSystem. Choose Create New then Script... Lets call it GlobalScript.gd then click Create . Next click on the Project tab in the top left corner. Then select Project Settings... Switch to the Globals tab. Right where you see it say Path: there is a folder icon. Clic...

Latest Posts

Making a Video Game

Vibe Coding: Am I Still a Developer? Does This Count?

Making a Sprite Explode in Godot: A Godot 4 Tutorial

Embracing Strong Typing in Godot 4

Inspecting the Inspector Dock: A Godot 4 Tutorial: Text, Auto Translate, and Process Modes Explained

How to Switch Scenes in Godot

Understanding the Input Map in Godot

Setting Up a Background Image in Godot

How to Make Money Online When All Else Fails (Spoiler: Swagbucks to the Rescue!)

Adding a Sprite in Godot