hi I have tried to place a rocket with the delay of 60 on the object test. However, I can no longer use the w,a,s,d control when I click on Run. I think the error is in the programming of the rocket.
if (done1= false){
int x;
int y;
x=0;
y=0;
if (!getWorld().getObjects(Test.class).isEmpty()){ // if a Test object is in the world
Actor actor = (Actor)getWorld().getObjects(Test.class).get(0); // get reference to Test object
int TestX = x; // gets x of Test object
int TestY = y; // gets y of Test object
getWorld().addObject(new Rocket(),x,y);
}
done1=true;
}
Greenfoot.delay(60);
done1=false;