#Can't use built in functions when they're not in func _ready():

5 messages · Page 1 of 1 (latest)

ashen osprey
#

I can't use for, while, and if when they're not in the ready function

primal prawn
#

that's correct - scripts in GDScript are not like in python, lua or javascript where they just run top to bottom

they are classes, so you can only declare variables and functions inside of them, not statements

ashen osprey
#

So I can only use functions inside the _ready function?

primal prawn
#

you can use statements in any function, not just ready

#
func my_super_special_custom_function():
  for i in 3:
    print(i)