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.
Printable View
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.
use GetTickCount
see my site for examples
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:
Usage: AnimateGUY GetTickCountCode:'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
This will work, I hope!
I'm only an email away - Sastraxi