I’m trying to spawn in enemies at random intervals by instantiating the enemies in a timer node. I was following this tutorial:
The only thing I did differently was the positioning, and I did the code in a timer node instead of a node 2D. Whenever I try to run the project, it gives me the error “Invalid call. Nonexistent function ‘instantiate’ in base ‘GDScript’.” The only thing I can think of being wrong is that something changed in GDScript because it appears that his version is 4.1.
Ok, I did actually fix it. The problem was that the nodes weren’t in the correct scene, so I managed to fix that.
However, I’m getting another error. The instantiated enemies can’t hit the player, and the left enemy can’t hit the player at all. so if you could help with that, that would be great.
Unfortunately, these forums are blocked on my laptop, so I have to use my phone, and it’s easier for me to take a picture instead of typing out the code.