Loop animation 5 times then stop?

Blitz3D Forums/Blitz3D Beginners Area/Loop animation 5 times then stop?

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.

"You don't seem to have the counter variable i did, to animate it five times"
Acualy I did try it. But it wasn't working and just now I
tried it again and what happens is the animation just keeps playing even before the player has come anywhere near it.

I have changed the collision check from a collition box to a math check (pir) player in range. And now I just want it to be on/off.If the player is in range play the animation
until the player is out of range.