
-----------------------------------
hamid14
Sat Nov 28, 2009 3:58 pm

Gravity and jumping
-----------------------------------
What is it you are trying to achieve?
Trying to make a picture "jump" up, then come down. Basically, im trying to make gravity.


What is the problem you are having?
Cant get the gravity to work right.


Describe what you have tried to solve this problem
I've tried making the y decrease after it reaches the max height for the jump, doesnt work.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Heres the code


View.Set ("offscreenonly")
var x,y : int := 100
var chars : array char of boolean
loop
View.Update
cls
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) then
y :=y + 5
end if
if y >= 200 then
y := y - 5
end if
if y >= 100 and y = 100 and y = 200 then
y := y - 5
end if
if y >= 100 and y 