PDA

Click to See Complete Forum and Search --> : jumping mario


May 16th, 2000, 06:08 AM
hello,

i am currently working on a mario like game, and i was wondering how to get a jump thing. where you can jump a certain height from your starting position, but you fall back down after.

also, if anyone can help me with scenario scrolling, i would be gratefull. thanks

-thanks

-t_dawolf

May 16th, 2000, 06:33 AM
Put the following code into a module. To use it, place an Image or Picture on Form1 and also place a CommandButton. In the CommandButton's Click() event place the code Jump(Form1.Image1)



Function Jump(VarVal As Control)

tmpTop = VarVal.Top

PauseTime = 0.2
Start = Timer
Do While Timer < Start + PauseTime
VarVal.Top = VarVal.Top - 1
Loop
Finish = Timer

Pausetimer = 0.2
Start = Timer
Do While Timer < Start + PauseTime
VarVal.Top = VarVal.Top + 1
Loop
Finish = Timer

Pausetimer = 0.1
Start = Timer
Do While Timer < Start + PauseTime
VarVal.Top = tmpTop
Loop
Finish = Timer

End Function

Fox
May 16th, 2000, 10:58 AM
See my website (http:\\foxmccloud.tsx.org) for a scrolling demo... also you'll find BitBlt and animation demos ;)