#Timer

9 messages · Page 1 of 1 (latest)

neat glade
#

hi sir, why doesn't the timer activate when I change the autostart value to true when it's _ready()

but autostart reads true

wraith lagoon
#

Your scene is laid out like this:

Node2D
  Timer

So what is happening is in this order:

  1. Timer checks if its autostart is true. If so, it starts. If not, it waits.
  2. Node2D sets the timer's autostart to true. But the timer has already run through that logic
#

Children are _ready before their parents

neat glade
neat glade
#

why is the autostart property on the timer only called when the timer is in _ready() condition

the description on the timer doesn't say that autostart is only called when the _ready() condition is

wraith lagoon
#
If true, the timer will automatically start when entering the scene tree.

Note: This property is automatically set to false after the timer enters the scene tree and starts.
#

"entering the scene tree" is like saying "has become ready"

neat glade
#

correct me if I'm wrong, and thank you once again, and sorry to disturb your time