A simple forever loop would suffice.
[blocks]
<forever>
<if> << <not> <touching color[ x] >>
<change y by( -1)
<end>
<end> [/blocks]
There you go.
Offline
I wrote a big tutorial about this, you can check it out here! The important part for you is the first section "Y Velocity", but if you want smooth side-to-side movement check out the second part "X Velocity"
Offline
If you want more advanced gravity, make the 'change y by' a little bit higher each loop (until terminal velocity is reached, which could occur if your stage represents an enormous height).
So you would get something like:
yVelocity = 1
if (not touching color x) or (has reached bottom of screen) {
change y by yVelocity
yVelocity = yVelocity + 0.1 (or whatever looks good)
}
(Sorry, I'm not used to working with blocks on the forums as I'm new, and there's no Preview button, so I don't take the risk of screwing up the post If you absolutely need blocks, say so)
Offline