Unit 3 - Animation and Games Lesson 17 Interactive Card - Sprite Walk

My student has made the following sprite build out to get started:

They feel like the legs are not moving correct and the back arm.

The student would like to know how to choose a number at random between two different numbers. If they had 0,400, they would like it to be 50/50 for choosing 0 or 400.

Hi @burnsk,

His animation looks really nice! But I see where the front facing leg does not move forward. It looks like the student has many of the frames complete in the animation tab so I’ll assume they know where that is located. They will need to add additional frames that make the front facing leg and the arm move as they wish.

You almost solved the random number problem in your question. Here is how I would break it down:

  1. Choose ONE number between two numbers:
    Create one variable and set it equal to randomNumber of 1 and 2. I’d call it “ran” or something similar.
    Create another variable that will become either the 0 or the 400.

  2. Would like it to generate either 0 or 400
    Create an if statement and if the random number variable is 1 then the other variable is set equal to 0 else the variable is set equal to 400.

Hope this helps!