I made a class named Blue1 with 3 methods : constructor , addedToWorld , and a method named set_Image . The problem was that even if I used addObject(new Blue1(some parameters),x,y), the actor was added at 0 0. I discovered that If I cut the code from addedToWorld and paste it in the constructor , the actor will appear at the correct coordinates .
my code from addedToWorld() : Can someone explain this "behavior"?
for(int i=1; i<images.length; i++)
{
images[i] = new GreenfootImage("blue"+i+".png");
}
setImage(images[1]);


