Hello! I'd be grateful for any replies I can get. I am making a restaurant game where people walk up and order their food. So far I have made the walking animation for an actor but I need the actor to move to a certain point in the world and stop. I am extremely new to this platform so please bear with me :>
The dimensions of my world are: (700, 460, 1)
Here is my code for the actor:
public class RedCustomer extends Actor { private GreenfootImage redWalk = new GreenfootImage("RedCustomerWalkingFinal.png"); private GreenfootImage redStill = new GreenfootImage("RedCustomerStillFinal.png"); public void act() { walkinganimation(); } public void walkinganimation() { Greenfoot.setSpeed(25); setImage(redWalk); move(5); Greenfoot.delay(1); setImage(redStill); move(5); Greenfoot.delay(1); if (getX() == 130 && getY == 120) { move(0) } } }