The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

For some reason, in my project, my Timer is a null instance. It's attached to the tree, everything is right and working, but my Timer isn't recognised. I've tried making it an onready variable and printing the variable, but something weird happens; sometimes it shows the right thing (the timer), and other times it shows Object:null. No clue what's happening. Any help would be appreciated.

Godot version 3.2.3
in Engine by (105 points)

1 Answer

0 votes

It has to be onready.

I suspect You placed print code in weird place, that prints before ready() is signalled.
Or is there some condition that makes your timer queued free ?
It would be easier if You showed your code, pretty sure it is some tiny mistake

by (8,188 points)

Hi, thanks for the response. It's printing every idle frame, so I get consistent results. It's very strange. It seems to both work but not work. There is nothing that queue_free's my timer; it's one shot and autostart is disabled. Here's my code:

My Code

enter image description here


I'll just leave the raw links to the images here:



Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.