Heres the code, I'm not sure why it's not working when it works for all the other actors (the actor in question is the Bomb actor)Also, could someone tell me how I could have this code remove another actor when it's clicked? That would be appreciated as well but this is the primary focus for me at the moment
private int timerBomb = 0;
private int spawnTimerBomb;
int friendClicked = 0;
void friendlyClicked(){
friendClicked += 1;
}
private void checkForSpawningBomb(){
Bomb[] bomb = new Bomb[1];
spawnTimerBomb = (spawnTimerBomb+1)%100;
if (spawnTimerBomb == 0){
for(int i = 0; i<bomb.length;i++){
bomb[i] = new Bomb();
addObject(bomb[i], Greenfoot.getRandomNumber(getWidth()), getHeight()-7);
bomb[i].setRotation(270);
bomb[i].turnTowards(Greenfoot.getRandomNumber(getWidth()), 0);
}
}
}
}

