P
puppo
Guest
Hi, this is my first post on the forum. I'm moving my first steps in the GameMaker world, and through Drag and Drop I created a simple counter with three keypad keys: "+" to add, "-" to subtract, "0" to reset. Everything works well, but I would like it to work even when the counter window is not active, or in other words is not in focus.
In the manual I saw the function "keyboard_check_direct". I tried to use it in the Step event:
But of course when I press the + or - keys, the numbers grow or decrease too fast.
What I would need is a function like "keyboard_check_direct_pressed", but I think it does not exist.
Is there a way to solve this problem?
My GameMaker version is 8.1.
Thanks!
In the manual I saw the function "keyboard_check_direct". I tried to use it in the Step event:
Code:
if keyboard_check_direct(vk_add)
{
counter += 1;
}
if keyboard_check_direct(vk_subtract)
{
counter -= 1;
}
What I would need is a function like "keyboard_check_direct_pressed", but I think it does not exist.
Is there a way to solve this problem?
My GameMaker version is 8.1.
Thanks!