Your computer's frameRate might make the animations look like they aren't playing.
If you are having trouble, try adding frameRate(40)
into your code and see if that helps.
But it still faces to the left no matter what direction it's moving in...
I'll start you off with some code, but see if you can replace the comments to make it work:
if ( //the xvelocity and yvelocity are both 0) { //Set this object's sprite's frameSpeed to 30 } else { //Set frameSpeed to 10 }
Teach coding to your students with MVCode Teach
MVCode offers an integrated product designed to teach coding to students.