Menu
CoddyTech

Ready Runs Once

Part of the Nodes and Scenes section of Coddy's Godot journey. Lesson 2 of 27.

Godot calls _ready() once for each node, when the node joins the game. Use it for what a node does when it appears, like setting its place or printing a greeting.

Lines inside a function run from top to bottom. These two print() calls write two lines in the Console, in this order:

func _ready():
	print("First")
	print("Second")

Every line inside a function starts with a tab. The tab tells Godot the line belongs to the function. A line with no tab is outside it.

challenge icon

Challenge

Easy

When the game starts, make the robot print two lines, in this order:

  1. Robot online
  2. Systems ready

Try it yourself

extends Node2D

func _ready():
	print("Robot online")
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Nodes and Scenes

Practice on your own: Godot playground