Results 1 to 3 of 3

Thread: Animation Speed

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    The Littlest State in the Union
    Posts
    57
    Hi. In my program i want a man to walk across the screen. But when he does the animation is too fast how can i make it so the framenumber goes up by 65 every 10 pixels.
    Visual Basic 6.0 Enterprise Edition
    Java 2
    Windows 98
    Mac OS 9.1

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    use GetTickCount

    see my site for examples

  3. #3
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Do you mean the milliseconds between the frames? Or do you mean the array of bitmaps? If its the first one (I think it is, at least) here is the code:

    Code:
    'PRIVATE declaration for GetTickCount API here.
    Dim X
    Dim MS
    Dim LastFrameNum as long
    
    Sub Form_Load
       MS=100
       X=0
    End Sub
    
    Sub AnimateGUY(MSS)
       X=X+1
       If X mod 10 = 0 then ms=ms+65
       IF gettickcount - mss => ms then
          'code for animating guy here, use X as the X number and whatever you want for the Y number.
          lastframenum=mss
       end if
    End Sub
    Usage: AnimateGUY GetTickCount
    This will work, I hope!

    I'm only an email away - Sastraxi
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

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