(Solved) How do i spawn enemies at random positions off the screen and move towards the player?

i am trying to make a 2d tower defense game and want to modify the sample tank game tutorial as the tower canon shooter.

What is the expected result

i have followed the tutorial instructions and even other related how-to answers and the code logic should drive swarms of enemies towards the tower.

What is the actual result

But while the code works for enemies I place in the screen editor the automatic creation of enemies isn’t happening.

Project Files


IDK about all of the code but the timer needs to be started first. Usually at the beginning.
The way timers are handled was changed in Gdevelop and older tutorials haven’t been updated. Timers used to be created just by being read but now they need to be explicitly started to work.

1 Like

Thanks for the great tip! It works!!! :slight_smile:

1 Like