Creating a Slower Animtex Frame Timer within RenderTween Loop?Help

Blitz3D Forums/Blitz3D Programming/Creating a Slower Animtex Frame Timer within RenderTween Loop?Help

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well I got somthing a little smoother working.
Setting the animframes is like a gessing game with this.

Any Improvments would be great.

Changes.....

( in while loop )


While Not KeyHit(1)

Cls

	Repeat
		elapsed=MilliSecs()-time
	Until elapsed

	
	ticks=elapsed/period

	
	tween#=Float(elapsed Mod period)/Float(period)

         
	For k=1 To ticks
		time=time+period
		If k=ticks Then CaptureWorld  
		
	     Update( )
	
             ; Changed this to ;
	      atx=time/50 Mod 3
	      If Not atx AnimTex( )
          
          

	     UpdateWorld : tf#=tf#+1

    Next

         
    RenderWorld tween#


and in AnimTex Function()

;Animate Texture UVs........\\\

Function AnimTex(  )

    af#=af#+1

    For seq=0 To 1
     For vi=0 To 1

         sf=atxarr(seq,vi,0)    ;Start Frame
         ef=atxarr(seq,vi,1)    ;End Frame
         cf=atxarr(seq,vi,2)    ;Current Frame
          c=atxarr(seq,vi,3)    ;Veretex

         cf=cf+1

         If cf>ef 
             cf=sf
         End If 

         U0#=UVarr(cf-1,0)
         V0#=UVarr(cf-1,1)
         U1#=U0#+.25
         V1#=V0#+.25

         S=GetSurface( Cube,1 )

         VertexTexCoords(s,c+0,U1,V0 )
         VertexTexCoords(s,c+1,U1,V1 )
         VertexTexCoords(s,c+2,U0,V1 )
         VertexTexCoords(s,c+3,U0,V0 )
         
         atxarr(seq,vi,2)=cf

     Next
    Next
 

End Function


Any Better Ideas Are welcome.