... Frames = 12 AnimDelay = 120 ;----------------------------------------- ; MAIN LOOP While Not KeyDown(1) Or quit = True If Draw_Samus = 1 Then DrawImage SamusSprites,0,0,Frames ini_Samus() EndIf Flip:Cls Wend End .... ;----------------------------------------- ; FUNCTIONS Function ini_Samus() If Frames = 22 Then Frames = 12 If TheTimer+AnimDelay < MilliSecs() Then TheTimer = MilliSecs() Frames = Frames + 1 End If End Function
If I take the stuff in the function and replace the ini_Samus() in the loop it works but if I put the ini_function it doesnt work I dont understand got any idea?