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

2014/12/10

How to make a actor turn when it reaches the edge of the World?

AabisHussain AabisHussain

2014/12/10

#
Really neeed help with how to make an actore move when it reaches the edge of the world?need the code
Retluoc Retluoc

2014/12/10

#
This is under the act method.
Let me know if this works


int edgeTurnAmount = 7;

if (atWorldEdge())
{
turn(edgeTurnAmount);
}
You need to login to post a reply.