Okay, well, just think of velocity as speed. X Velocity is the speed going horizontally (left and right), and Y Velocity is the speed going vertically (up and down).
Right, so imagine you have a script like this:
Now, if we add velocity:
It changes the speed at which the sprite is moving to the left and right. It always changes x by the variable "X Velocity," which is controlled by the left and right arrow keys.
Of course, that doesn't include slowing down if you aren't pressing anything, but that's a bit more advanced...
For more information, see Velocity on the Scratch Wiki.
Offline
Wow, WeirdF. That was an awesome response. I've been using velocity for some time, and that was great. But may I suggest: Set X VELOCITY to X VELOCITY to X VELOCITY (*) 0.98 for friction. K?
Offline
ZaRiTo wrote:
Wow, WeirdF. That was an awesome response. I've been using velocity for some time, and that was great. But may I suggest: Set X VELOCITY to X VELOCITY to X VELOCITY (*) 0.98 for friction. K?
That's really only necessary if there are areas with varying friction, but good point regardless.
Offline