This site requires JavaScript, please enable it in your browser!
Greenfoot back
Ben3
Ben3 wrote ...

2016/1/12

An actor following another actor

Ben3 Ben3

2016/1/12

#
I am making a game for school and want the 'bad guys' to follow the main character instead of moving randomly around the screen (this is what i've coded them to do). can someone just tell me what code to put and where to put it. should I create a whole new method or not?
danpost danpost

2016/1/12

#
It is not a matter of whether you should create a whole new method or not; it is a matter of removing the random moving code and adding code to turn toward the main character and move. As you have not shown what code you do have, it would be difficult to say exactly what should be changed as far as they are concerned.
You need to login to post a reply.