Dear greenfooters,
I want to make the two ships, that are starting from above and move in a vertical line downwards, to stop right in the middle of the screen. I tried to make an 'invisible' wall, but two little green feet appear on the screen when I assign no image to them. This is my attempt at it so far.
Actor wall;
wall = getOneObjectAtOffset(0, 0, wall.class);
if (wall == null)
{
setLocation(getX(), getY() + 1);
}
Also, can I do such thing as to stop it at an fixed Y- coordinate? Like this, but this isnt working.
setLocation(getX(), getY() + 1);
if(getY() == 309) {
move(0);
}
I am a beginner so please bear with me :)
Thanks in advance