Results 1 to 3 of 3

Thread: jumping mario

  1. #1
    Guest

    Exclamation

    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

  2. #2
    Guest

    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)


    Code:
    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

  3. #3
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    See my website for a scrolling demo... also you'll find BitBlt and animation demos

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width