CompiledFrog

Post #41: GDScript Constants

Today was a very long day, but a good one. Today's post will be very short. I have been trying to show up and learn something about Godot, every day. Some posts are longer and probably way more thought out. Some are shorter due to real life constraints. But that's just how it goes sometimes, and that's okay!

If you use GDScript, you should know that it supports constant values. Constants are values whose value must be known at compile time, and they can't be changed later during runtime. Some examples from the Godot documentation:

const A = 5
const B = Vector2(20, 20)

Line 1 sets the constant value A to 5. Line 2 creates a Vector2 type with x and y values, assigning it to constant B.

See and read more here!