Hey guys, i want to make a game, just like Asteroids.
So i need Asteroids to spawn at the top world edge and move down.
The movement downwards i already got, but the spawning is kinda hard for me!
this one is the code i tried with.
Still not working
public void act() { if(Greenfoot.getRandomNumber(2000) < 50) { addObject(new Asteroid_Small(), Greenfoot.getRandomNumber(519),0); } }