hey everyone, what im asking is fairly basic, but anyway here goes. in some of the space shooter games i made u always had to continually press the space bar to fire, but i want to make it so that u can press and hold the space bar, and it will fire bullets at a constant rate, but not so that it shoots them out really fast.
so what im asking is how would one go about coding up some sort of timer or something to do this? i usually just make a variable that counts miliseconds and then when i get a certain amount i fire the next shot, or do the next thing. but i was thinking that there must be a better or different way to do this.
thanks