Hi,
I'm trying to make one of my actors, Traffic, spawn in the middle third of the world. However, I'm not sure how to do this. Can someone help? Thank you.
Here's the snippet in MyWorld code:
if (trafficCounter == 100){
Traffic t = new Traffic();
addObject(t, Greenfoot.getRandomNumber(getWidth()/4) * 4, 0);
trafficCounter = 0;
}
