I have a scenario where i am making a black hole on screen suck everything toward it. I have an astronaut that would like to not get eaten by the black hole. i want him to move around freely when using the arrow keys but if no arrow key is being pressed, then he should move toward the black hole like everything else. i can easily make him move with the arrow keys OR get sucked into the black hole, but I can't get both to happen. i have the normal isKeyDown() check in a list of if statements which works fine until i try to use the getSuckedIn() method. how can i add a single else at the end to call getting sucked in to start? or do i need another way to make it happen? code looks like this right now...
private void checkKeyPress()
{
if (Greenfoot.isKeyDown("left"))
turn(-8);
if (Greenfoot.isKeyDown("right"))
turn(8);
if (Greenfoot.isKeyDown("up"))
move(2);
if (Greenfoot.isKeyDown("down"))
move(-2);
}
i can't seem to make an else statement follow all this to start the getSuckedIn() method i made which looks like this
public void getSuckedIn()
{
turnTowards(950, 65); // where the black hole is sitting
move(1);
}

