How do you make it so that once a counter gets to a certain number , a actor(that's not already in the scene) gets added to the world. I've been playing around but I can't seem to get the code right.
Thanks,
Hawx_
if(counter.getValue() == targetNumber) getWorld().addObject(new ActorA(), locationX, locationY);
if(timesTouched.getValue() == 2) addObject(new Car(), Greenfoot.getRandomNumber(600), 1);