How to time events to an animation

Blitz3D Forums/Blitz3D Programming/How to time events to an animation

I was using animtime in a way like this

if switch=0 and animtime>=number# then
 switch=1
 do something
endif

if switch=1 and animtime<number# then
 switch=0
endif


where number could be 15 of 30 Frames.