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

2012/12/24

using up/right arrow keys to get movement in that direction

LukeCrawford LukeCrawford

2012/12/24

#
I have used several different lines of code to try and produce this movement when pressing either up/right arrow buttons and up/left arrow buttons and have not had any luck. I am also a beginner so that does not help anything either. Pretty much spent the last two days on doing this and stressed myself enough to finally ask for help. No I am not looking for someone to do it for me, but give me a shove in the right direction. Thanks
danpost danpost

2012/12/25

#
Start with base offsets for x and y initially set to zero. Adjust those values depending on the keys pressed. Then use the final results to determine the direction of movement.
You need to login to post a reply.