Hello, I am new to Greenfoot, and coding altogether, and struggling to use the software. I'm trying to get an actor to detect an object and then stop, but it is detecting nothing. Having completed only the Greenfoot tutorials I've already used up what limited codes I know to detect another actor so if anyone could offer a solution to a noobie I'd very much appreciate
Here's what I tried
public void Stop()
{
Actor barrier;
barrier = getOneObjectAtOffset(0, 0, barrier.class);
if (barrier != null)
{
move(0);
}
}
