How to time events to an animation

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

Any advise on how to time events to points in an animation. I tried useing animtime() but it's not working correctly. I basically want something to happen at a certain spot of a characters 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.