This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gzuzfrk
Gzuzfrk wrote ...

2013/5/22

Increasing Move

Gzuzfrk Gzuzfrk

2013/5/22

#
 private int timer;
private int chance = 125;
 private void spawnAlien()  
{  
  timer = (timer+1)%1500;
  if (timer == 0) chance = chance-10;
 int rand = Greenfoot.getRandomNumber(150);  
    if (rand >=3) return;  
    
    if (rand == 0) addObject(new Alien(), 870, 453);  
   
}  
public 
How do you increase someones speed over time? And also is this code correct I want to make it add more aliens over time
You need to login to post a reply.