i need a timer for my shooting

Blitz3D Forums/Blitz3D Beginners Area/i need a timer for my shooting

ok i'm using camerapick for my shooting and i'm trying to make a timer that is set up depending on the distance, something like this
shoottime = 1 * pickedz()

and then i have this down my the shooting
	MilliSecs = MilliSecs + 1
	If MouseHit(1)=True
		MilliSecs = MilliSecs + 1
		PlaySound gunshot
		picked=CameraPick(camera,width/2,height/2)
		s.spark=New spark
		s\entity=CopyEntity(spark)
		s\alpha=1
		If MilliSecs >= shoottime#
		PositionEntity s\entity,PickedX(),PickedY(),PickedZ()
		MilliSecs = 0
		EndIf
	EndIf

it makes the sprite show up but it doesn't have any delay if the distance is further