Ver código fonte

Improve phrasing of constants in GDScript basics (#4036)

Co-authored-by: Hugo Locurcio <[email protected]>
Nathan Lovato 4 anos atrás
pai
commit
3f0a2830dc

+ 6 - 2
getting_started/scripting/gdscript/gdscript_basics.rst

@@ -654,8 +654,12 @@ the scene tree::
 Constants
 ~~~~~~~~~
 
-Constants are similar to variables, but must be constants or constant
-expressions and must be assigned on initialization.
+Constants are values you cannot change when the game is running.
+Their value must be known at compile-time. Using the
+``const`` keyword allows you to give a constant value a name. Trying to assign a
+value to a constant after it's declared will give you an error.
+
+We recommend using constants whenever a value is not meant to change.
 
 ::