This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
aidanbbbb
wrote ...
2018/3/6
HELP! Making an object turn at a certain set of coordinates.
aidanbbbb
2018/3/6
#
How do I make an object turn once it reaches a certain set of coordinates. If statement please!
danpost
2018/3/6
#
aidanbbbb wrote...
How do I make an object turn once it reaches a certain set of coordinates. If statement please!
Example code given (for use in act method in class of object):
if (getX() == 100 && getY() == 250) turn(90);
You need to login to post a reply.
X