I'm pretty new to greenfoot, and for my first big project I'm making a Pacman style game. I've hit a roadblock when coding the ghosts, however.
I have two actors that interact, MovePad and Ghost. I need the MovePad to detect when a ghost passes over it, run a method that checks which paths are blocked, and return a variable that tells the ghost to move left, right, up, or down. I've already made the movepad detect when a ghost passes it, but I don't know the code to make MovePad change a variable in Ghost's code. What's the most basic way to do this?

