i want my character parform an action with the keys just one time per tick. for example, to shot a bullet with the "if(key_w)" instruction it keep shooting infite bullets while i keep the key pressed, the same happens to jump it keep increasing altitude until i loose the key.
use a function for shooting a bullet or jumping and assign those functions to your keys. This can be done in the main function (for example) by writing:
Code:
on_w = shoot;
on_space = jump;
Note: Do NOT write parentheses after the function name when assigning it to a key!