0 votes

This is the tutorial I've been following.
In the tutorial 'autostart' in timer node is off and enemies are spawned without any problem.

I wrote the exact same code except for a few variable names.
However, in my projects, when 'autostart' is off, enemies do not appear at all.
I found out when I turn on the 'autostart', enemies are spawned just like the tutorial.
I don't understand why the code works differently when I'm using the same code.
I want to know how can I make it work with 'autostart' turned off.
Because I want first enemy to appear after 3 seconds, not right away.
This is my code. >> https://pastebin.com/rA1T0Kbr

Thank you in advance. :))

Godot version 3.4.2.
in Engine by (15 points)

2 Answers

0 votes
Best answer

If you want a timer to work you need to start it , autostart starts the timer by default so its same as
func ready ():

by (151 points)
selected by
+1 vote

note the following :

this is user defined function : ready()
this is already defined virtual function : _ready()

by (31 points)
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.