Hmongkeysauce
Senior member
hi folks,
im writing a game for a class project using the allegro game library. im about done except there's one little tidbit thats bothering me. when pressing the 'F' key to fire once, multiple bullets would come out instead of just 1. i installed an allegro timer to help adjust it, but it seems to be not working as desired. im wondering if there are any c++ functions that would be able to do this? meaning: read a key, then if x amount of time has not passed, the same key would not be read. i think that should work, but i don't know if there's such a function in c++ or allegro. any help would be appreciated. thanks!
im writing a game for a class project using the allegro game library. im about done except there's one little tidbit thats bothering me. when pressing the 'F' key to fire once, multiple bullets would come out instead of just 1. i installed an allegro timer to help adjust it, but it seems to be not working as desired. im wondering if there are any c++ functions that would be able to do this? meaning: read a key, then if x amount of time has not passed, the same key would not be read. i think that should work, but i don't know if there's such a function in c++ or allegro. any help would be appreciated. thanks!