Hello I am programming a little Bomberman right now and my character shall put a bomb on he place he stands is allowed to move off it ofcourse but musn't move on it again, i wanted to solve this with getOneObjectAtOffset, but it seems the method doe'snt recognize the Bomb.
thats the example when i move to the right, but when there is a bomb i move trhough it
if(Greenfoot.isKeyDown("right")) // checks if right key is pressed
{
setLocation(getX()+1,getY());
Actor wand = getOneIntersectingObject(wall.class);
if (wand != null)
{
setLocation(getX()-1,getY());
}
Actor bombe = getOneObjectAtOffset(getX()+60,getY(),Bomb.class);
if (bombe!=null)
{
setLocation(getX()-1,getY());
}
}

