Yes theres a way to make gravity without variables. First you make a sprite and place it at the bottom of the screen,preferablly a sprite that blends in with the backround. The you do this for the sprite that the gravitys going to affect.
<when green flag clicked>
<forever>
<if>
<< <not><touching[ bottom sprite >>
<change y by( - 3
Then we do this for the same sprite.
<when[ Up ]key pressed>
<change y by( 10
That should make gravity for that sprite!
Offline
"Gravity" is not a constant velocity downward drift, but a constant downward acceleration, which gives increasing velocity.
Offline
Moving things at a constant speed does not require variables, but getting them to accelerate (which is what gravity does unless you have a very high amount of friction) does require an extra variable to keep track of the current velocity.
If you are always falling from the same height, you may be able to compute the velocity from the y position, which would eliminate the need for a variable.
Offline